Mailing Labels Template (with number designation)

Hello,

I’m working on an automated solution for pulling information from a database and exporting the information to Word Mailing labels. Word allows you to select a template by number, for example, I’m using Avery Labels #5196. Is there a way for me to do this programmatically (VB .NET), or should I just create a template file and use that?

Thanks!

Hi
Thanks fro your request. Aspose.Words provides mail merge functionality.
So you should create template and use it. For more information see the following links.
https://docs.aspose.com/words/net/mail-merge-template/
https://docs.aspose.com/words/net/types-of-mail-merge-operations/
Best regards.

Hello,

I’m not looking to use merge fields. I’m just looking to use a Microsoft Word template for labels.

The attatched image shows pretty much what I need. Rather than store a template somewhere (where someone might move or change it), I’d prefer to automatically select a Word template (#5196). Is this possible?

Hi
No, unfortunately you can’t do this using Aspose.Words. You can just create template and then perform mail merge to insert data from database into the template.
For example see the following code and attaché documents.

// Open template
Document doc = new Document(@"Test196\in.doc");
string[] names = { "myLable" };
string[] values = { "This is my cool lable" };
// Perform mail merge
doc.MailMerge.Execute(names, values);
// Save output
doc.Save(@"Test196\out.doc");

Best regards.