Printing envelopes programmatically

D

Dave

Group,

I am trying to print envelopes via code and seem to have a problem with the
some of the settings.

The code:
With Documents.Add.Envelope
.DefaultSize = "Size 6 3/4"
.Insert Address:=addr, ReturnAddress:=retaddr
.FeedSource = wdPrinterManualFeed

' No matter what value I use here, I cannot get a true "Clockwise" print
' A "Clockwise" print would be the same as shown in Words 'Tools>Letters and
' Mailings>Envelopes and Labels>Options>Printing Options>"Clockwise
rotation" checkbox
.DefaultOrientation = wdLeftClockwise

' I can only get a 'Face Up' printing even if this is set to false
.DefaultFaceUp = True

.PrintOut FeedSource:=True
End With

If I use Words menu 'Letters and Mailings' to print an envelope then all
settings work just fine.

Any help appreciated,
Dave
 
M

Malcolm Smith

Dave

I print envelopes via code simply by having a template of the required
size and a few bookmarks on there to place the text.

I also have the feeder of my printer in an .ini file so that when I print
it the print.dot start-up routine knows what printer I am using, the
template name and then sends the envelope to the right tray.

I have never liked those in-built dialogue boxes within Word and I find it
best to make my own templates.

- Malc
www.dragondrop.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top