View Single Post
 
Old 10-29-2019, 10:08 AM
schwartzkl schwartzkl is offline Windows 10 Office 2016
Novice
 
Join Date: Oct 2019
Posts: 1
schwartzkl is on a distinguished road
Default ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro

I am very new to macros. I am running Office 2016 with Windows 10. When I highlight an address in a Word document and then run the below macro, the address which was highlighted is not showing in the Delivery Address Section for the Envelope or Label it comes up blank. I can't do anything in any of the fields of the dialog box but I can click the buttons. If I click the Print button the highlighted address prints on the Envelope. I need this macro to stop so a user can make edits to the address or edit the return address if they need to. This macro did work in Office 2010.

Any help would be greatly appreciated on why it is not showing the address.
ActivePrinter = GetPrinter("\\hh-pgh-ps-2\22S-LH")
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterEnvelopeFeed
.OtherPagesTray = wdPrinterEnvelopeFeed
End With
Application.Run MacroName:="ToolsCreateEnvelope"
With ActiveDocument.PageSetup
.FirstPageTray = 262
.OtherPagesTray = 262
End With
End Sub



Thanks,
Karen Schwartz
Reply With Quote