You would need to use an If...then...Else construction in the mail merge
main document to test for data in the fields to achieve what you are after.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> I'm using a Word OCX control to display document, and need toggle the
> document display between merged and unmerged status, the VBA code seems as
[quoted text clipped - 14 lines]
> it's
> not what I wanted.
CoolVBA - 02 Jul 2007 09:04 GMT
Thanks much!
My case is that a text file is used as the data source which is exported by
program, and users can insert any merge fileds into a Word document. So, it
seems too diffcuilt to manage all the Next Merge Fields while the If
...then...Else construction used...
> You would need to use an If...then...Else construction in the mail merge
> main document to test for data in the fields to achieve what you are after.
[quoted text clipped - 17 lines]
> > it's
> > not what I wanted.
CoolVBA - 02 Jul 2007 09:08 GMT
Thanks much!
My case is that a text file is used as the data source which is exported by
program, and users can insert any merge fileds into a Word document. so, it
seems diffcuilt to manage all the Next fields while if...then...else
construction used...
> You would need to use an If...then...Else construction in the mail merge
> main document to test for data in the fields to achieve what you are after.
[quoted text clipped - 17 lines]
> > it's
> > not what I wanted.