A
Adrian
Using Word 2000 (and Access 2000)
I have a Word mailmerge document that I am running from an Access
application. I use the following code:
Set myWDApp = CreateObject("Word.Application")
myWDApp.Application.Visible = True
myWDApp.Documents.Open (strDocPath)
Set myDoc = myWDApp.ActiveDocument
With myDoc.MailMerge
.MainDocumentType = wdFormLetters
.OpenDataSource Name:=strCSV
.Destination = wdSendToNewDocument
.Execute True
End With
If I stop the code after 'Set myDoc = myWDApp.ActiveDocument' and manually
run the mailmerge blank address lines are removed. If I just run the above
code the blank lines are not removed.
Is this a known problem, or am I doing something wrong here?
Thanks for any help.
Adrian.
I have a Word mailmerge document that I am running from an Access
application. I use the following code:
Set myWDApp = CreateObject("Word.Application")
myWDApp.Application.Visible = True
myWDApp.Documents.Open (strDocPath)
Set myDoc = myWDApp.ActiveDocument
With myDoc.MailMerge
.MainDocumentType = wdFormLetters
.OpenDataSource Name:=strCSV
.Destination = wdSendToNewDocument
.Execute True
End With
If I stop the code after 'Set myDoc = myWDApp.ActiveDocument' and manually
run the mailmerge blank address lines are removed. If I just run the above
code the blank lines are not removed.
Is this a known problem, or am I doing something wrong here?
Thanks for any help.
Adrian.