M
msnews.microsoft.com
I have been attempting to fill in the TO: field on a merged document without
sucess. Below is the code that I am using. The document merge works fine
with the main document body. However, the top portion of the document that
cotains the TO: field, Subject: field, etc. is not being filled in. I have
used the following short segment of code in an attempt to make this work:
Can anyone tell me what else can be happening. The datasource contains the
"E-mail" field and it is populated. All the main document fields work fine.
Any help would be greatly appreciated. Thank you.
wrdApp.DefaultSaveFormat = "Doc"
With wrdApp.ActiveDocument.MailMerge
..Destination = Word.WdMailMergeDestination.wdSendToEmail
..MailAsAttachment = False
..MailAddressFieldName = "E-mail"
..MailSubject = ""
..SuppressBlankLines = False
With .DataSource
..FirstRecord = .FirstRecord
..LastRecord = .LastRecord
End With
..Execute(Pause:=True)
End With
sucess. Below is the code that I am using. The document merge works fine
with the main document body. However, the top portion of the document that
cotains the TO: field, Subject: field, etc. is not being filled in. I have
used the following short segment of code in an attempt to make this work:
Can anyone tell me what else can be happening. The datasource contains the
"E-mail" field and it is populated. All the main document fields work fine.
Any help would be greatly appreciated. Thank you.
wrdApp.DefaultSaveFormat = "Doc"
With wrdApp.ActiveDocument.MailMerge
..Destination = Word.WdMailMergeDestination.wdSendToEmail
..MailAsAttachment = False
..MailAddressFieldName = "E-mail"
..MailSubject = ""
..SuppressBlankLines = False
With .DataSource
..FirstRecord = .FirstRecord
..LastRecord = .LastRecord
End With
..Execute(Pause:=True)
End With