PDA

View Full Version : Solved: Word mailmerge skip empty fields, not empty lines



ReikiHugo
08-18-2010, 06:42 AM
In a mailmerge datasource some of the name and addres fields can be empty (blank). We don't want empty lines in the addres of the resulting word documents so we tried .SuppressBlankLines = True to avoid this:

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.Execute
End With

We can not use this method because any suppressed blank line will "lift" the remaining content of the page.

Is there any other solution for this problem?

fumei
08-18-2010, 10:18 AM
I am not sure what kind of a solution you are looking for. If there is a supressed line because it is blank, yes the following content is "lifted" up. What else are you expecting to happen?

ReikiHugo
08-24-2010, 03:48 AM
I was (or should be) expecting that to happen but I still wanted a solution for mij problem.
I solved the problem bij putting the adress in a fixed-size textbox.

Thanks for trying to help me!