Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi - I'm using XP SP2 and Office 2007. I'm trying to write a macro to send
documents to a particular tray (say tray 1 or 2) on a particular printer (printer 2). (Currently I have to go to Print/Choose Printer 2/Properties/Choose Tray 1 etc etc). I thought it would be a relatively easy thing to record a macro, using mouseclicks, as it's not a complicated procedure, just an annoying one! Anyway - macro seems to record okay, but doesn't actually work! What it does, instead, is change my default printer from my printer (printer 1) to printer 2; and only takes paper from Tray 1, rather than either tray (depending on which macro I use). I thought this might be because I'm connected to Printer 2 via a network ... however, I've tried to create the same macro on Printer 2's computer, and virtually the same thing happens. I'm at a bit of a loss, and would appreciate any help. I hope my explanation is clear enough! (By the way - I know nothing about VBE, I only know how to create macros by using mouse-clicks or keystrokes). Thanks in advance, Megan |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
The following should work:
Sub LaserTray2() Dim sCurrentPrinter As String sCurrentPrinter = ActivePrinter ActivePrinter = "Put the name of the required printer here" With Options .DefaultTray = "Set the tray option here" End With Application.PrintOut FileName:="" With Options .DefaultTray = "Use printer settings" End With ActivePrinter = sCurrentPrinter End Sub See also http://www.gmayor.com/fax_from_word.htm and http://pubs.logicalexpressions.com/P...cle.asp?ID=116 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org galatea2153 wrote: Hi - I'm using XP SP2 and Office 2007. I'm trying to write a macro to send documents to a particular tray (say tray 1 or 2) on a particular printer (printer 2). (Currently I have to go to Print/Choose Printer 2/Properties/Choose Tray 1 etc etc). I thought it would be a relatively easy thing to record a macro, using mouseclicks, as it's not a complicated procedure, just an annoying one! Anyway - macro seems to record okay, but doesn't actually work! What it does, instead, is change my default printer from my printer (printer 1) to printer 2; and only takes paper from Tray 1, rather than either tray (depending on which macro I use). I thought this might be because I'm connected to Printer 2 via a network ... however, I've tried to create the same macro on Printer 2's computer, and virtually the same thing happens. I'm at a bit of a loss, and would appreciate any help. I hope my explanation is clear enough! (By the way - I know nothing about VBE, I only know how to create macros by using mouse-clicks or keystrokes). Thanks in advance, Megan |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Two problems with macros | Microsoft Word Help | |||
With macros enabled I still receive "macros disabled" warning. | Microsoft Word Help | |||
Problems with macros after upgrade to 2003 | Microsoft Word Help | |||
Macros in 2003 multiple but connected problems? | Microsoft Word Help | |||
Problems with Macros? I'm not sure what the problem is. | Microsoft Word Help |