K
Karthik
I’m developing a windows based .net application and I’m using Word object for
maintaining and printing documents.
Well, here is my problem:
I managed to do the printing stuff using the word object's property itself.
I picked the Bin Numbers of my printer and I assigned them like
wrodObject.FirstPageTray = (int) 260; (the number for "Tray 2" I got it from
DeviceCapabilities API). But still the paper is not picking from the "Tray 2"
it is taking only from "Tray 1".
But in order to solve this Issue I contacted HP Printer support team and
they said to change the "Tray Mode" to "Cassette" from "First" in "Paper
Handling Menu" of the printer itself.
Then surprisingly my code works fine!
But still I have one more problem, that at the time of giving printout if
the printer has no paper in it then it gives me error on printer.
So, I decided not to change the printer setting and I revert back the change
from "cassette" to "First" on the Paper Handling of the printer itself.
And I tried doing my tray selection from the Word Application itself (not
programmatically) there in File->Print. I can able to see "options" button in
the left corner of the "Print dialog" and by seeing the below web-site I'm
able understand that our code(word object) is trying to controlling the
settings in the "options" button's Dialog.
http://www.microsoft.com/technet/scriptcenter/topics/office/manage/wordpr.mspx
But this alone will not help us to do the job, so in the same File->Print
dialog there is one more button "Properties" in the Right Top corner. If you
click through that you can see "Paper/Quality" tab and there one more "Paper
Source" combo box is available. If I change that also to "Tray 2" I'm able to
print in "Tray 2".
But I do not know how can I control this setting programmatically?
Or Am I missing out anything in word object itself?
Can any one please help me to solve this issue?
Thanks!
Regards
Karthikeyan
maintaining and printing documents.
Well, here is my problem:
I managed to do the printing stuff using the word object's property itself.
I picked the Bin Numbers of my printer and I assigned them like
wrodObject.FirstPageTray = (int) 260; (the number for "Tray 2" I got it from
DeviceCapabilities API). But still the paper is not picking from the "Tray 2"
it is taking only from "Tray 1".
But in order to solve this Issue I contacted HP Printer support team and
they said to change the "Tray Mode" to "Cassette" from "First" in "Paper
Handling Menu" of the printer itself.
Then surprisingly my code works fine!
But still I have one more problem, that at the time of giving printout if
the printer has no paper in it then it gives me error on printer.
So, I decided not to change the printer setting and I revert back the change
from "cassette" to "First" on the Paper Handling of the printer itself.
And I tried doing my tray selection from the Word Application itself (not
programmatically) there in File->Print. I can able to see "options" button in
the left corner of the "Print dialog" and by seeing the below web-site I'm
able understand that our code(word object) is trying to controlling the
settings in the "options" button's Dialog.
http://www.microsoft.com/technet/scriptcenter/topics/office/manage/wordpr.mspx
But this alone will not help us to do the job, so in the same File->Print
dialog there is one more button "Properties" in the Right Top corner. If you
click through that you can see "Paper/Quality" tab and there one more "Paper
Source" combo box is available. If I change that also to "Tray 2" I'm able to
print in "Tray 2".
But I do not know how can I control this setting programmatically?
Or Am I missing out anything in word object itself?
Can any one please help me to solve this issue?
Thanks!
Regards
Karthikeyan