Field codes

C

ColsHub

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
 
G

Graham Mayor

You cannot use parts of fields in this way. vba is the only possibility.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top