Question and Answers

taso81 Need help with a macro I recorded to use in Microsoft Word 2003.? - taso81 I am connected to several printers. One of them has a envelope feeder attached to it which I would like to utilize to print my envelopes. I recorded a macro which switches my printer, copies the selection (i.e. the address), selects envelopes and labels from the MS Word menu, prints, and swiches back to my default printer. This works however everytime I run the macro and go to the printer, the printout shows the address that I used to record the macro instead of the current one I have selected. Here is the macro: Sub envelope() ' ' envelope Macro ' Macro recorded 6/8/2009 by Taso ' Selection.Copy ActivePrinter = "HP 4350 ltr" ActiveDocument.envelope.PrintOut ExtractAddress:=False, OmitReturnAddress _ :=False, PrintBarCode:=False, PrintFIMA:=False, Height:=InchesToPoints( _ 3.88), Width:=InchesToPoints(8.88), Address:="(Selection.Paste)", AutoText:= _ "ToolsCreateLabels1", ReturnAddress:="", ReturnAutoText:= _ "ToolsCreateLabels2", AddressFromLeft:=wdAutoPosition, AddressFromTop:= _ wdAutoPosition, ReturnAddressFromLeft:=wdAutoPosition, _ ReturnAddressFromTop:=wdAutoPosition, DefaultOrientation:=wdLeftLandscape _ , DefaultFaceUp:=True, PrintEPostage:=False ActivePrinter = "RICOH Aficio MP C6000 RPCS" End Sub
Best Answer: Not 100% sure, but this code: Address:="(Selection.Paste)" obviously isn't doing what you want it to. Generally, when you put something between quote marks, it doesn't get interpreted, so try removing the quotes and see if that works. Hope that helps. - The Phlebob

Best Answers are selected by the person who asked the question or other Yahoo! users. Find out more at Yahoo! Answers.

Enter a keyword below to find questions and answers from real people.

Want to ask a question? Go to Yahoo! Answers

Product Categories

Computers Home Office Wi-Fi & Networking Phones & PDAs Cameras & Camcorders TV & Home Theater Portable Audio

My Tech

Please enable your browser's cookies to activate the My Tech column.


Question and Answer content at Yahoo! Tech is written by Yahoo! users at Yahoo! Answers. Yahoo! does not evaluate or guarantee the accuracy of any Yahoo! Answers content. For more information, read the Full Disclaimer.

Opinions expressed by the Advisors are their own and do not necessarily reflect the views of Yahoo! Inc. Yahoo! receives no compensation from any manufacturer or distributor nor does it compensate any Advisor for the coverage of any product or service in any Advisor's content.