Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Validate Merge Fields
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? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS Word form fields versus mail merge fields | Mailmerge | |||
How can I validate a Word document to find out if it is corrupt? | Microsoft Word Help | |||
Validate form field | Microsoft Word Help | |||
Validate table contents | Microsoft Word Help | |||
Word dont have the ability to validate internal link | Microsoft Word Help |