H
haz
I'm currently having a great deal of trouble trying to print envelopes
from the right tray in word.
Interactively I can set the envelope tray for the ActivePrinter from
"Tools->Letters and Mailings->Envelopes and Labels, Options, Printing
Options" in the "Feed from" dropdown list.
But there seems to be absolutely no way to set this tray programmatically.
I have tried using ActiveDocument.Envelope.Insert followed by setting
ActiveDocument.Envelope.FeedSource to the value of the right tray (257
for my printer) but this gives a 5843 "One of the values passed to this
method or property is out of range" error. Only the wdPaperTray
constants seem to be within the valid range, however I've tested with
these too and none seem to correspond to the actual envelope tray.
I prefer to use a single ActiveDocument.Envelope.PrintOut call anyway to
avoid actually adding the envelope to the document, however in this case
I realise I can't set the FeedSource property if I do that.
I've also tried temporarily altering the DefaultSource in the DEVMODE
structure for the chosen printer to try and force all print output to
that tray, but this didn't work either.
Does anyone have any ideas on how this can be done?
haz.
from the right tray in word.
Interactively I can set the envelope tray for the ActivePrinter from
"Tools->Letters and Mailings->Envelopes and Labels, Options, Printing
Options" in the "Feed from" dropdown list.
But there seems to be absolutely no way to set this tray programmatically.
I have tried using ActiveDocument.Envelope.Insert followed by setting
ActiveDocument.Envelope.FeedSource to the value of the right tray (257
for my printer) but this gives a 5843 "One of the values passed to this
method or property is out of range" error. Only the wdPaperTray
constants seem to be within the valid range, however I've tested with
these too and none seem to correspond to the actual envelope tray.
I prefer to use a single ActiveDocument.Envelope.PrintOut call anyway to
avoid actually adding the envelope to the document, however in this case
I realise I can't set the FeedSource property if I do that.
I've also tried temporarily altering the DefaultSource in the DEVMODE
structure for the chosen printer to try and force all print output to
that tray, but this didn't work either.
Does anyone have any ideas on how this can be done?
haz.