Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge in a macro
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 |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge in a macro
You probably need to do the registry fix described in
http://support.microsoft.com/kb/825765 Peter Jamieson "dave" wrote in message oups.com... 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 |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge in a macro
yes. that worked. thank you.
|
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mailmerge and Macro | Mailmerge | |||
MailMerge Macro HELP | Microsoft Word Help | |||
Macro execution using MailMerge | Mailmerge | |||
Word mailmerge to PDF macro | Mailmerge | |||
Mailmerge by macro | Mailmerge |