Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] dennistiu@yahoo.com is offline
external usenet poster
 
Posts: 1
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Word form fields versus mail merge fields [email protected] Mailmerge 4 March 4th 06 05:31 PM
How can I validate a Word document to find out if it is corrupt? John Liungman Microsoft Word Help 4 February 24th 06 09:04 AM
Validate form field Amy Microsoft Word Help 2 October 10th 05 06:26 PM
Validate table contents Peter Hattam Microsoft Word Help 1 July 11th 05 01:21 PM
Word dont have the ability to validate internal link leoman730 Microsoft Word Help 1 March 16th 05 10:47 PM


All times are GMT +1. The time now is 03:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"