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 / June 2007

Tip: Looking for answers? Try searching our database.

Mail Merge removing macros headache

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pj_world_85@hotmail.com - 14 Jun 2007 09:51 GMT
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
Graham Mayor - 14 Jun 2007 10:21 GMT
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.

Signature

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

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

> Hi there,
>
[quoted text clipped - 15 lines]
> Regards
> PJ
Peter Jamieson - 14 Jun 2007 11:02 GMT
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
> Hi there,
>
[quoted text clipped - 15 lines]
> Regards
> PJ
 
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.