PDA

Click to See Complete Forum and Search --> : Why doesn't Wordobject print????


Dozo_1st
Sep 10th, 2002, 10:31 AM
I hope somebody can help me with this one;

I have the following code:

oWord = CreateObject("Word.Application")
oWord.Visible = True
WordIntface.rewrite_text()
oWord.ActiveDocument.PrintOut()
oWord.Quit()
oWord = Nothing

where WordIntface is a webmethod to replace specific text in the document I opened...

After that I want to print with the method PrintOut.

I get no errors, I get no warnings, everything just seems fine... :) until I walk to the printer to find out nothing has been printed :mad:

What am I doing wrong :confused:

Thanx for the help people!

Dozo :rolleyes:

robdotnet00
Sep 10th, 2002, 02:54 PM
does it bring up the print driver program asking u to choose what printer or anything

Dozo_1st
Sep 12th, 2002, 02:55 AM
The apsx page reloads, but nothing pops up or anything.

it is busy, it passes the code and then it just sits there waiting for the next order of the user to interact with the aspx page...

And nothing rolls out of the printer.... :mad:

Dozo_1st
Sep 13th, 2002, 03:25 AM
Nobody has the answer to this????

:( :( :(

Frans C
Sep 13th, 2002, 04:15 AM
Word prints on the background by default. I think you quit word before printing has even started.

change:
oWord.ActiveDocument.PrintOut()
to:
oWord.ActiveDocument.PrintOut(Background:=False)

I think this will solve your problem.

Dozo_1st
Sep 13th, 2002, 06:43 AM
I am 1 step closer to the printjob now, thnx to you.

But it failed to print due to printersettings which were not set. But if I omit everthing it should use the default, shouldn't it?

Dozo

Dozo_1st
Sep 18th, 2002, 03:02 AM
:confused: