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

Tip: Looking for answers? Try searching our database.

Mailmerge in a macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dave - 14 May 2007 18:17 GMT
I have a mail merge that works very nicely, but when I try to run it
from a macro it errors out on the " .Destination =
wdSendToNewDocument" line telling me the "requested object is not
available".  Any ideas?  Thanks.

   Documents.Open FileName:="""Policy projection main.doc""", _
       ConfirmConversions:=False, ReadOnly:=False,
AddToRecentFiles:=False, _
       PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
       WritePasswordDocument:="", WritePasswordTemplate:="", Format:=
_
       wdOpenFormatAuto, XMLTransform:=""
   With ActiveDocument.MailMerge
       .Destination = wdSendToNewDocument
       .SuppressBlankLines = True
       With .DataSource
           .FirstRecord =
ActiveDocument.MailMerge.DataSource.ActiveRecord
           .LastRecord =
ActiveDocument.MailMerge.DataSource.ActiveRecord
       End With
       .Execute Pause:=False
   End With
Peter Jamieson - 14 May 2007 18:28 GMT
You probably need to do the registry fix described in

http://support.microsoft.com/kb/825765

Peter Jamieson

>I have a mail merge that works very nicely, but when I try to run it
> from a macro it errors out on the " .Destination =
[quoted text clipped - 19 lines]
>        .Execute Pause:=False
>    End With
dave - 14 May 2007 18:48 GMT
yes. that worked.  thank you.

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.