BrandonR
11-16-2013, 11:15 PM
Hi Everyone,
I'd appreciate some help with this coding question.
Requirement: Using VBA, I want to create a new mailing label document, and automatically type text into the new document, then save it. I generated the following code using the Macro recording feature, and it properly creates the document (using the Avery L7165 label layout).
Problem: I know how to use VBA to place text into a document and to save a document, but I can't figure out how to get a handle on the newly created document. Please note that I don't want to use any mail merge functionality.
Sub Test()
Application.MailingLabel.DefaultPrintBarCode = False
Application.MailingLabel.CreateNewDocumentByID LabelID:="805957278", _
Address:="", AutoText:="", LaserTray:=wdPrinterManualFeed, ExtractAddress _
:=False, PrintEPostageLabel:=False, Vertical:=False
End Sub
Thanks in advance for any guidance provided.
Brandon
I'd appreciate some help with this coding question.
Requirement: Using VBA, I want to create a new mailing label document, and automatically type text into the new document, then save it. I generated the following code using the Macro recording feature, and it properly creates the document (using the Avery L7165 label layout).
Problem: I know how to use VBA to place text into a document and to save a document, but I can't figure out how to get a handle on the newly created document. Please note that I don't want to use any mail merge functionality.
Sub Test()
Application.MailingLabel.DefaultPrintBarCode = False
Application.MailingLabel.CreateNewDocumentByID LabelID:="805957278", _
Address:="", AutoText:="", LaserTray:=wdPrinterManualFeed, ExtractAddress _
:=False, PrintEPostageLabel:=False, Vertical:=False
End Sub
Thanks in advance for any guidance provided.
Brandon