D
dennistiu
Basically I am using VBA to merge fields. I want to know if there is a
way to validate the merge fields specified in the document and the
available merge fields specified in the datasource:
Dim wrdApp As New
Microsoft.Office.Interop.Word.Application
wrdApp.ActiveDocument.MailMerge.OpenDataSource( *** My
data source information *** )
wrdApp.ActiveDocument.MailMerge.Destination =
wdSendToNewDocument
wrdApp.ActiveDocument.MailMerge.Execute()
I want to validate all the merge fields first before callign execute.
Is this possible?
The problem is if I have a specified merge field in the document that
is not in the datasource. Word displays a popup to warn me about the
invalid field. Since I am doing everything in the background, I have
no way of knowing the popup.
I see a check method but what does this do? It checks and then what?
It doesnt return anything or any boolean value to me
wrdApp.ActiveDocument.MailMerge.Check() - cant seem to know what this
will do?
Anyone have any ideas or suggestions?
way to validate the merge fields specified in the document and the
available merge fields specified in the datasource:
Dim wrdApp As New
Microsoft.Office.Interop.Word.Application
wrdApp.ActiveDocument.MailMerge.OpenDataSource( *** My
data source information *** )
wrdApp.ActiveDocument.MailMerge.Destination =
wdSendToNewDocument
wrdApp.ActiveDocument.MailMerge.Execute()
I want to validate all the merge fields first before callign execute.
Is this possible?
The problem is if I have a specified merge field in the document that
is not in the datasource. Word displays a popup to warn me about the
invalid field. Since I am doing everything in the background, I have
no way of knowing the popup.
I see a check method but what does this do? It checks and then what?
It doesnt return anything or any boolean value to me
wrdApp.ActiveDocument.MailMerge.Check() - cant seem to know what this
will do?
Anyone have any ideas or suggestions?