MailingLabels mailmerge automation

G

GSGarden

I have been trying to get the sample code in the knowledegbase article
HOWTO: Automate Word from Visual Basic to Create a Mail Merge for Mailing
Labels http://support.microsoft.com/default.aspx?kbid=258512 working.

When I run my code I get an error when it reaches the execute command,
reporting that the property is not available because main document does not
have a datasource and I am stumped as to what it could be.

I have managed to narrow the problem to the following line.

..MainDocumentType = wdMailingLabels

If I remove the above line it works, but the data is merged into a document
with section breaks between each record, which is not what I am trying to
achieve.

Any pointers will help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top