Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Pip''''n Pip''''n is offline
external usenet poster
 
Posts: 9
Default Execute merge when file opens

I have created multiple merge documents that are opened from an ASP developed
page using a hyperlink. I would like for the merge to be executed when the
document is opened to ease user frustrations.

Currently I am wanting to "edit Individual Documents" when the merge is
executed however I may need to send the document as an attachment to an email
in the future.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Execute merge when file opens

An Autoopen macro in the document with the following code should do it

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
' .Destination = wdSendToEmail
.Execute
End With

Changing the destination by uncommenting the wdSentToEmail line and
commenting the wdSentToNewDocument line will send the documents as the body
of an email message. To sent them as an attachment, it would be necessary
to first merge each document to separate file and then send that file as an
attachment.

See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
at:

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

I have written and that can be downloaded from that site will allow you to
create each letter as a separate file with a filename taken from a field in
the data source with a minimum of fuss.

Then to send the letters as an attachment,

See the article "Mail Merge to E-mail with Attachments" at

http://word.mvps.org/FAQs/MailMerge/...ttachments.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

"Pip''''n" wrote in message
...
I have created multiple merge documents that are opened from an ASP
developed
page using a hyperlink. I would like for the merge to be executed when the
document is opened to ease user frustrations.

Currently I am wanting to "edit Individual Documents" when the merge is
executed however I may need to send the document as an attachment to an
email
in the future.

Thanks in advance.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to execute for a subsequent mail merge Colonel Blip New Users 4 September 6th 06 11:43 AM
How can I execute a mail merge document with different pictures jchappelle Mailmerge 3 July 8th 06 06:36 AM
Mail Merge doesn't execute until manually Opening the desired document [email protected] Mailmerge 1 February 28th 06 06:19 PM
Opening a file opens an extra file Bob Stringer New Users 0 July 17th 05 06:02 PM
Is it possible to execute a mail merge using two seperate data sou Mominator Mailmerge 3 March 11th 05 02:22 PM


All times are GMT +1. The time now is 09:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"