Hiding MergeFields That dont merge


#1

When using the mailmerge function I have found that if a mailmerge field isnt populated with a value when the merge occurs, it appears in the final docuement produced like this '<>'

I have been using doc.MailMerge.DeleteFields() to hide unpopulated/unused mergefields to stop them appearing in the final document. But this now leaves white space in the place of where the merge fields.

Is there any way of removing the white space left by the mergefield deletes??

doc.MailMerge.RemoveEmptyParagraphs = True

I tried this but it doesnt appear to do anything


#2

If you are sure you don’t need those fields in the document you can use Document.MailMerge.DeleteFields()


#3

Sorry I edited my original post before I saw that reply, as I eventually found if else where in the forum!!! Any ideas again…!?