wordObject

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
 
J

Jonathan West

K

Karthik

Hi Jonathan

Thanks for your reply.

I already read your article and I'm following the same way you told on that
article.
(i.e. since no two printers will have theirs Bin Numbers same and our Word
Enum values are also doesn't match with all printer bin, we have to get the
bin numbers by calling the deviceCapabalities API and need to assign that
Number to wordObject's Property)So, I'm doing the same way. But I couldn't
get the desired result until I change the "Paper handling Menu" of the
printer. Even that gives me problem when the printer is not filled with
papers and we try to give printout.
I'm connecting to a network printer. So I've installed a local driver for
that printer and I'm using this driver as the default printer for my program.

Thanks!

Regards
Karthik
 

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