Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2019, 10:08 AM
schwartzkl schwartzkl is offline ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Windows 10 ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Office 2016
Novice
ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro
 
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
  #2  
Old 10-29-2019, 12:31 PM
Charles Kenyon Charles Kenyon is offline ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Windows 10 ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Modify macro to only add bullets to highlighted text if it exists. 14spar15 Word VBA 2 10-30-2018 08:27 PM
ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Macro in Word to track colour of highlighted text BABZ Word VBA 1 01-09-2017 10:33 PM
ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro Address lost when I replace display text in URLs nmckenna Word 1 10-02-2015 05:10 PM
ToolsCreateEnvelope Does Not Display Text of Highlighted Address When Used in a Macro 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft