Mail Merge removing macros headache

P

pj_world_85

Hi there,

I have a word mail merge that gets data from a 3rd party software. It
receives data such as contact name and project value.

The project value then populates in word. I have a macro in word that
if you change the project value it will then update the rest of the
fields based on the new project value. This is achieved via a macro.

Problem:
As soon as I mail merge in word to get the initial project value, word
automatically strip the template from the macro. Is there somehow how
I can disable/change setting that word should NOT remove the macro
during it's mail merge function??

Thanks!!

Regards
PJ
 
G

Graham Mayor

Mail merge creates a new document - any macros will remain associated with
the original template. They do not form part of the merged document. That
shouldn't matter too much. Your bigger problem will be that the fields in
the merge document will be merged to text in the merged document so that the
macro will not have them to work on.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter Jamieson

There is a problem when you merge to a new document: although the new
document has the same template attached as the old doucument, and should
therefore be able to run any macros in that template, it does not always
appear to work that way - you have to close/re-open the document before they
become available.

There seem to be two options:
a. make the template a global addin (Tools|templates and addins)
b. initiate the merge from a macro that either closes/reopens the output
document or runs the code you need.

Peter Jamieson
 

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