|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
Cross-posted (with responses) at Word Answers.
For cross-posting etiquette, please read: Excelguru Help Site - A message to forum cross posters Doug Robbins is one of the better Word programmers out there. He is trying to help you, as a volunteer. I would suggest you stick with him. The people who answer questions here also frequent the Word Answers forum. Note, I deleted the duplicate post in the Word-vba forum. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modify macro to only add bullets to highlighted text if it exists. | 14spar15 | Word VBA | 2 | 10-30-2018 08:27 PM |
Macro in Word to track colour of highlighted text | BABZ | Word VBA | 1 | 01-09-2017 10:33 PM |
Address lost when I replace display text in URLs | nmckenna | Word | 1 | 10-02-2015 05:10 PM |
I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? | AustinBrister | Word VBA | 8 | 05-28-2015 02:42 PM |
Macro to mark non-coloured/non-highlighted text as hidden | PeterB | Word | 0 | 10-28-2009 07:54 AM |