Avatar of GordonPrince
GordonPrince
Flag for United States of America asked on

cannot print from envelope tray on HP 4300

I'm using an HP 4300 printer with an envelope feeder + trays 1-4. Printing from Notepad I can get envelopes to print from the envelope feeder. But printing from Word 2007 I can't.

I think I've got the printer trays mapped to the kinds of paper in them.

Any ideas on how to troubleshoot what appears to me to be a Word 2007 problem?
Microsoft Word

Avatar of undefined
Last Comment
Joanne M. Orzech

8/22/2022 - Mon
Joanne M. Orzech

So when you open an envelope, and go to File, Page Setup, is the envelope feeder selected for both first and second pages?  If not, select it and try it again.

GordonPrince

ASKER
I'm not sure the File, Page setup applies. I'm using the "Create Envelopes" command, then "Print". There doesn't appear to be a Page Setup option at this point.

To me, the area with the red circle around it indicates Word should try to pull from the Envelope Feeder.

It works from Notepad, but Word doesn't seem to be able to do it.

Any other ideas? Maybe you've got a better way of printing envelopes. The whole thing is going to be automated with VBA, so anything that works is fine.
Envelope-dialog.bmp
Joanne M. Orzech

If you click the Options button, it should say Envelope Feeder... but you're telling me that these are all set to print to the envelope feeder, yet it still isn't pulling?  

If you're writing it in VB, you shouldn't really worry about this at this point because you can set it in the VB....with code:

        ActiveDocument.PageSetup.FirstPageTray = wdPrinterEnvelopeFeed
        ActiveDocument.PrintOut

Hope this helps :)
Your help has saved me hundreds of hours of internet surfing.
fblack61
GordonPrince

ASKER
I keep getting the error. I've tried several things. But what I'd like to get to is the following:

    lngSource = InputBox("Enter the WdPaperTray code number", strTitle, 0)
    appWord.ActiveDocument.Envelope.PrintOut FeedSource:=lngSource

0 prints ok, 5 (WdPaperTray.wdPrinterEnvelopeFeed) and most other values display the error shown below in the attached screen shot.

Again, if I print from Notepad I can get the EnvelopeFeed tray to work. But I can't get it to work from Word.

Any other ideas?
Print-Envelope.bmp
Joanne M. Orzech

I just loaded Office 2007.  Let me give it a shot....

And you're trying to set the envelope feeder from VB right?

ASKER CERTIFIED SOLUTION
Joanne M. Orzech

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
GordonPrince

ASKER
I've been unable to get to the physical location until last week (working from out of town remotely). Sorry for the delay.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
GordonPrince

ASKER
This is what I finally got to work:

appWord.ActiveDocument.Envelope.PrintOut FeedSource:=0

For some reason "WdPaperTray.wdPrinterEnvelopeFeed" wouldn't work.
Joanne M. Orzech

Glad you finally got it to work.... sometimes you just have to record a macro to view what the tray names are .....