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 / Mailmerge and Fax / July 2007

Tip: Looking for answers? Try searching our database.

Execute merge when file opens

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pip''''n - 27 Jul 2007 18:48 GMT
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.
Doug Robbins - Word MVP - 28 Jul 2007 01:11 GMT
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/MergeWithAttachments.htm

Signature

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

>I have created multiple merge documents that are opened from an ASP
>developed
[quoted text clipped - 7 lines]
>
> Thanks in advance.

Rate this thread:






 
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.