Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Word macro for printing from different tray HP2430

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sargey - 05 Apr 2007 12:26 GMT
Hi.

I'm having problems with a macro for printing a letter. One copy comes from
tray 2 (File copy) and the second comes from the manual feed (Headed paper)

The macro works fine on an HP 4050 printer.

The printer is getting replaced  for a HP2430 but I cannot get the macro to
print from the new printers tray's

If I edit the macro, there is an entry .firstpagetray = wdPrinterManualFeed

I created a new macro with the new printer and the entry on the same line
came out as .firstpagetray = " Manual Feed in Tray 1"

If I try and change the old macro entry (.firstpagetray =
wdPrinterManualFeed)  to  .firstpagetray = " Manual Feed in Tray 1" the macro
won't run and gives me an error message asking to debug.

Can anyone see how I can change the old macro rather than creating a new one?
Graham Mayor - 05 Apr 2007 13:28 GMT
You can't make up your own vba syntax!

Different printers call their trays with different commands. Word has to
adapt to what the printer requires.

eg

   ActivePrinter = "HP LaserJet 4050 Series PCL"
       With ActiveDocument.PageSetup
       .FirstPageTray = 257
       .OtherPagesTray = 260
   End With

   ActivePrinter = "HP LaserJet 2200 Series PCL"
   With ActiveDocument.PageSetup
       .FirstPageTray = wdPrinterManualFeed
       .OtherPagesTray = 258
   End With

Both do the same thing but with different printers. The simplest approach
would be to set the 2340 as the active driver and record the page setup
requirements in a macro - then extract the required strings from all the
associated bumph and add them to your macro.

You might also have a look at tray assignements in
http://www.gmayor.com/fax_from_word.htm and
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi.
>
[quoted text clipped - 19 lines]
> Can anyone see how I can change the old macro rather than creating a
> new one?
Sargey - 05 Apr 2007 13:46 GMT
Hi Graham, thanks for the reply.

I didn't make up the syntax.

I created a new macro and when through the steps as I would normally.

The macro called the the tray " Manual Feed in Tray 1", that's where my
problem lies, i think.

Cheers
Sargey

> You can't make up your own vba syntax!
>
[quoted text clipped - 47 lines]
> > Can anyone see how I can change the old macro rather than creating a
> > new one?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.