Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Field codes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ColsHub - 25 Sep 2007 14:58 GMT
Is there a way to manipulate the information in a FieldCode? Here's what I'm
trying to do:
The filename of my document is "ABC-D-EFG-123-HIJ-456 name1 name2 name3
789012" (1st part is always 21 characters, last part is always 6 characters,
middle part (names) can vary)
In my header I added field code for Filename.
What I like to do is split the filename into 3 pieces and put them on 3
different (successive) lines.
What I get- "ABC-D-EFG-123-H IJ-456 name1 name2 name3 789012"
What I want-
ABC-D-EFG-123-H IJ-456
name1 name2 name3
789012

And if I could get real fancy, inject words like this
Doc Number: "ABC-D-EFG-123-HIJ-456"
Doc Name: "name1 name2 name3"
Revision: "789012"

I know how I could do this in VBA using RIGHT LEFT & LEN commands but I'd
like to keep it simple.

ColsHub
Graham Mayor - 25 Sep 2007 15:20 GMT
You cannot use parts of fields in this way. vba is the only possibility.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Is there a way to manipulate the information in a FieldCode? Here's
> what I'm trying to do:
[quoted text clipped - 19 lines]
>
> ColsHub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.