Help with mailing labels

Hi,

I’m trying to create classic mailing labels with the Avery5160 layout. It works as expected except for the remaining, empty/unused labels. In stock Word when you do the label merge, any unused labels will be completely blank.

When I run it thru GemBox using the ClearOptions… the merge fields remain. If I use RemoveMergeFields() after Execute(), the fields are gone but the in-between formatting (ie the comma between city and state) remains. It’s not a big deal, but a little wasteful on paper.

Hi Fred,

Can you please try again using the ClearOptions:

document.MailMerge.ClearOptions =
    MailMergeClearOptions.RemoveUnusedFields |
    MailMergeClearOptions.RemoveEmptyParagraphs;

document.MailMerge.Execute(dataSource);

But try it with this latest bugfix version:
https://www.gemboxsoftware.com/document/nightlybuilds/GBD33v1076.zip

Or this package:
Install-Package GemBox.Document -Version 33.0.1076-hotfix

Does this solve your issue?

Regards,
Mario