View Single Post
  #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.