A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

start macro (in merged doc) after mailmerge



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2010, 05:39 PM posted to microsoft.public.word.mailmerge.fields
Wordmerger[_5_]
external usenet poster
 
Posts: 1
Default start macro (in merged doc) after mailmerge


Hello,
I created a Word (2007) template .dotm, that is merged with a data
file.
I merge to a new Word document.
The template contains a macro.

Word should execute the macro automatically in the new (merged)
document (to fix some layout issues).
The new document is not based on the template (as it should be), but on
Normal.dotm and the macro is not available in this document.

The macro should only start in the merged document and not in any other
documents.

Has anybody got a clue as to how to solve this problem?

Thanks in advance.




--
Wordmerger
Ads
  #2  
Old June 4th, 2010, 12:35 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default start macro (in merged doc) after mailmerge

You would need to use MailMerge Events to achieve what you are after
automatically.

You will find an example of their use in the add-in that you can download
from the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/individual_merge_letters.htm

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...

Hello,
I created a Word (2007) template .dotm, that is merged with a data
file.
I merge to a new Word document.
The template contains a macro.

Word should execute the macro automatically in the new (merged)
document (to fix some layout issues).
The new document is not based on the template (as it should be), but on
Normal.dotm and the macro is not available in this document.

The macro should only start in the merged document and not in any other
documents.

Has anybody got a clue as to how to solve this problem?

Thanks in advance.




--
Wordmerger


  #3  
Old June 4th, 2010, 04:09 PM posted to microsoft.public.word.mailmerge.fields
Wordmerger[_6_]
external usenet poster
 
Posts: 1
Default start macro (in merged doc) after mailmerge


Hi Doug,

I can't find the MailMerge Event in the example on Grahams site.
Besides, I wonder if this would solve my problem.
The only thing I want is that a macro is executed automatically after
the MailMerge (in the merged document).

I used the field MacroButton in the main document (a template), but
this causes to run the macro in the main document.
I want the macro to run automatically in the merged document.

The merged document is always (?) based on Normal.dotm which doesn't
contain the macro. It would be easier if the merged document would be
based on the template of the main document, because in that situation I
could create an AutoExec macro.
Now this is of course not an option since the merged document is based
on Normal.dotm and I don't want all new documents to run this macro.

Until I find a better solution, I'll copy the macro to their
Normal.dotm and ask my users to click a macro button after the
mailmerge.
Not very elegant, but at least it works.

Thanks so far!



Doug Robbins - Word MVP;471428 Wrote:
You would need to use MailMerge Events to achieve what you are after
automatically.

You will find an example of their use in the add-in that you can
download
from the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/individual_merge_letters.htm

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...-

Hello,
I created a Word (2007) template .dotm, that is merged with a data
file.
I merge to a new Word document.
The template contains a macro.

Word should execute the macro automatically in the new (merged)
document (to fix some layout issues).
The new document is not based on the template (as it should be), but
on
Normal.dotm and the macro is not available in this document.

The macro should only start in the merged document and not in any
other
documents.

Has anybody got a clue as to how to solve this problem?

Thanks in advance.




--
Wordmerger -





--
Wordmerger
  #4  
Old June 4th, 2010, 11:19 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default start macro (in merged doc) after mailmerge

The mail merge events are used in the Add-in that you can down load from
that site.

Rather than asking people to copy something into their normal.dot template,
you could distribute a template that you have them save in the Word Startup
folder so that it becomes a global add-in. Then the macros in that template
will be available for use in all documents.

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...

Hi Doug,

I can't find the MailMerge Event in the example on Grahams site.
Besides, I wonder if this would solve my problem.
The only thing I want is that a macro is executed automatically after
the MailMerge (in the merged document).

I used the field MacroButton in the main document (a template), but
this causes to run the macro in the main document.
I want the macro to run automatically in the merged document.

The merged document is always (?) based on Normal.dotm which doesn't
contain the macro. It would be easier if the merged document would be
based on the template of the main document, because in that situation I
could create an AutoExec macro.
Now this is of course not an option since the merged document is based
on Normal.dotm and I don't want all new documents to run this macro.

Until I find a better solution, I'll copy the macro to their
Normal.dotm and ask my users to click a macro button after the
mailmerge.
Not very elegant, but at least it works.

Thanks so far!



Doug Robbins - Word MVP;471428 Wrote:
You would need to use MailMerge Events to achieve what you are after
automatically.

You will find an example of their use in the add-in that you can
download
from the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/individual_merge_letters.htm

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...-

Hello,
I created a Word (2007) template .dotm, that is merged with a data
file.
I merge to a new Word document.
The template contains a macro.

Word should execute the macro automatically in the new (merged)
document (to fix some layout issues).
The new document is not based on the template (as it should be), but
on
Normal.dotm and the macro is not available in this document.

The macro should only start in the merged document and not in any
other
documents.

Has anybody got a clue as to how to solve this problem?

Thanks in advance.




--
Wordmerger -





--
Wordmerger


  #5  
Old June 5th, 2010, 05:00 PM posted to microsoft.public.word.mailmerge.fields
Wordmerger[_7_]
external usenet poster
 
Posts: 1
Default start macro (in merged doc) after mailmerge


Thanks Doug,

I'm going to try this.


Doug Robbins - Word MVP;471543 Wrote:
The mail merge events are used in the Add-in that you can down load from

that site.

Rather than asking people to copy something into their normal.dot
template,
you could distribute a template that you have them save in the Word
Startup
folder so that it becomes a global add-in. Then the macros in that
template
will be available for use in all documents.

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...-

Hi Doug,

I can't find the MailMerge Event in the example on Grahams site.
Besides, I wonder if this would solve my problem.
The only thing I want is that a macro is executed automatically after
the MailMerge (in the merged document).

I used the field MacroButton in the main document (a template), but
this causes to run the macro in the main document.
I want the macro to run automatically in the merged document.

The merged document is always (?) based on Normal.dotm which doesn't
contain the macro. It would be easier if the merged document would be
based on the template of the main document, because in that situation
I
could create an AutoExec macro.
Now this is of course not an option since the merged document is
based
on Normal.dotm and I don't want all new documents to run this macro.

Until I find a better solution, I'll copy the macro to their
Normal.dotm and ask my users to click a macro button after the
mailmerge.
Not very elegant, but at least it works.

Thanks so far!



Doug Robbins - Word MVP;471428 Wrote:-
You would need to use MailMerge Events to achieve what you are after
automatically.

You will find an example of their use in the add-in that you can
download
from the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/individual_merge_letters.htm

--
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, originally posted via msnews.microsoft.com

"Wordmerger" wrote in message
...-

Hello,
I created a Word (2007) template .dotm, that is merged with a data
file.
I merge to a new Word document.
The template contains a macro.

Word should execute the macro automatically in the new (merged)
document (to fix some layout issues).
The new document is not based on the template (as it should be), but
on
Normal.dotm and the macro is not available in this document.

The macro should only start in the merged document and not in any
other
documents.

Has anybody got a clue as to how to solve this problem?

Thanks in advance.




--
Wordmerger --




--
Wordmerger -





--
Wordmerger
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.