Mail Merge Field Code Alternative

H

homes747

I know how to program field codes based on mail merge data, but I have a
problem in that text strings in field codes appear to be limited to a certain
number of characters (255 perhaps). Is there an alternative to simply typing
in the text you need in the field code itself?

For example, in an offer letter, if an employee is receiving relocation
assistance, they should receive two paragraphs of information (more then Word
will allow you to put in a field code text string). Is there any other way
to work the if/then in there, so I don't just have to delete the two
paragraphs for all individuals who aren't eligible.

Thanks,
Morgan
 
D

Doug Robbins - Word MVP

Use an INCLUDETEXT field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Graham Mayor

Use an includetext field or an autotext field to insert however much data
you like.
eg
{IF {Mergefield RelocationAssistance} = "True" "{IncludeText
"c:\\path\\docname.doc"}"}

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
H

homes747

Graham,

Thanks for the tip, but I'm still having a little problem. In the example
below, I want the if statement to look up whether or not someone's STI Level
is blank. If it's not blank, then I want them to includetext. If it is
blank, then I want it to stay blank. Here's what I wrote:

{ IF { MERGEFIELD STILevel } <> "" "{ IncludeText
"\\Usrtnac02\hr-recruiting$\\HR Database\\Offer Data Text - Sign-on, Relo,
SIP, STI.doc" ShortTermIncentive }" "" }

However, it just displays the text MERGEFIELD. As you can see, I have
several text fields that I want this to work with housed in a single Word
document separated by bookmarks. Can you help?

Morgan
 
H

homes747

I figured out that I have to use Ctrl-F9 to place the brackets, but now I'm
getting a message that states "Error! Not a valid file name."

Any thoughts?

Morgan
 
D

Doug Robbins - Word MVP

Did you use Ctrl+F9 to insert each pair of field delimiters { }? You cannot
just type them in using the keys that look like that on the keyboard.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

Get you include text field working outside of the mailmerge environment. If
the error message still says that the filename is invalid, you will have to
do something to get a valid filename.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
H

homes747

Doug,

Thanks. It appears that the problem is the fact that I'm trying to "link"
to a document on a shared drive. When I did everything the same, but moved
the file to my C: drive, it worked fine.

I'll have to find another solution.

Morgan
 
D

Doug Robbins - Word MVP

Not so much the shared drive as the way to which it is being referred.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - 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