Word printouts from VB

Mike
10-09-2002, 06:45 AM
Folks,

On a Word template, I've put a few ActiveXs (RTFs, textboxes, grids) which I can all control perfectly well from VB. When I try to print the finished product manually from Word, everything prints out OK. But when I try to print out the very same finished product using the Printout method from VB, only the object frames get printed. What am I doing wrong?

Thanks! Mike

Wamphyri
10-09-2002, 07:12 AM
Do it manually and record a macro to see what arguments are set on the PrintOut method.

Mike
10-09-2002, 12:17 PM
Carl, I did. The macro generated when performing the printout directly from MSWord is simply ActiveDocument.PrintOut.

It's the strangest thing. This is my sequence of tests:
- I create the document and fill it up with wording and stuff.
- I try to print it. Doesn't work.
- I then make the Word.Application visible and try to print from Word. Doesn't work. Interesting clue.
- I save the document, reopen it manually from Word and try to print. The printing works. So I create a macro to capture the steps that have led to the proper printing. There's nothing new contained in the macro, all basic stuff.
- I try to print the saved document from a separate VB application. The printing doesn't work.

I'm really at a loss as to why the document prints properly when opened AND printed from Word, but not when opened from VB. The Open statement parameters are a match in both cases.

Clueless. Mike

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum