Print word document from VB6
Posted on 2004-11-16
I would like to print a word document via VB6. During the print process, I don't want any word dialog bosxs to appear.
The following snippet prints the document, but triggers multiple word dialog boxes:
Private Sub Command1_Click()
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open "g:\my documents\sample.doc"
Set WordObj = Nothing
Also, I've just started looking at Automation and I'm wondering why I don't see some of these classes/methods in the VB Object Browser. In the VB IDE,I have a reference to word and I see Documents.Open, but not PrintOut or Quit. Do they appear in some other class? I'm an absolute Automation novice. Is there a good basic tutorial available anywhere?
Thanks for any help.