Inserting Autotext during a merge

R

Ricki Miles

I am upgrading a mail merge template into Word XP that was previously used
in Word 2 (yes, Word 2!!!!) with data coming from a mainframe. There are
over 50 signatures (just regular text formatted with a script font) that
were used in Word 2 as glossaries.

As an example, if the signature for Mary Smith was created as a glossary
"ms", and "ms" would be entered in the data header for the signatures was
"sig", the mergefield in the template was

{glossary {mergefield sig} }

When merged, the glossary "ms" would be placed in the document and would
automatically expand to "Mary Smith".

I have been unsuccessful getting AutoText in Word XP to automatically expand
when merged. I do not want to use macros unless there is no way around
them.

I appreciate any suggestions - TIA,

Ricki
 
P

Peter Jamieson

If you add a bit more nesting and use

{ AUTOTEXT "{ IF 1 = 1 "{ MERGEFIELD sig }" }" }

you should be OK. Incidentally, you can still use

{ GLOSSARY "{ IF 1 = 1 "{ MERGEFIELD sig }" }" }

in Word XP but I suepect now would be a good time to change :)

Peter Jamieson
 
R

Ricki Miles

Hi Peter,

Thank you so much for the response.

I have tried the syntax you sent, but I am not getting the autotext to fill
in when I complete the merge.

Here is what I have done:
Create an autotext in normal.dot called "rm" which will expand to give me a
signature of several lines
Create a Word document called 'data.doc" which contains a one column/two row
table, the first row is "sig" and the second row is "rm"
Create a mail merge letter using the data.doc source, type in the following
using Control+F9 for the braces:

{AUTOTEXT "{IF 1=1 "{MERGEFIELD sig}"}"}

When I merge, I get the following message "A field calculation error
occurred in record 1", I click OK, and then in the resulting document
"Error! AutoText entry not defined".

I have tried using the original GLOSSARY field, but it does not work either.

By the way, the "sig" field will always have an entry, so should there is
actually no need for an IF statement, just the autotext entry in that field
needs to be expanded in each letter as a signature.

Can you tell me what I am doing wrong? I really appreciate your help!!!

Ricki
 
P

Peter Jamieson

Were /all/ the special field code braces entered using ctrl-F9?

If so, if you set thing up so you are previewing the data, then display the
field codes (Alt-F9), select the { MERGEFIELD sig } field, right click and
select the toggle fields option, do you see "rm" ? If you then select the
entire { IF 1 = 1 field, right-click and select the toggle fields optin, do
you still see "rm"?
By the way, the "sig" field will always have an entry, so should there is
actually no need for an IF statement, just the autotext entry in that
field needs to be expanded in each letter as a signature.

I agree that that is how it probably should be, but since it doesn't behave
properly the IF is just a trick to try to get it to do so.

Peter Jamieson
 
R

Ricki Miles

Hi again, Peter,

THANK YOU!!!! I'm not sure why it didn't work first time, but I retyped
using Control + F9 (maybe I hadn't done that for each brace the first time),
and it worked very well. I would never have figured it out without your
help - Thanks again,

Ricki
 

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