Results 1 to 2 of 2

Thread: Printing a Word Document

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    11

    Arrow Printing a Word Document

    Hi,

    I am trying to print a Word Document and kill the word instance. The word instance is killed, but the document is never printed. Does anyone have a solution to this problem?

    Thanks,
    Bob

    Code:

    Dim objWord As New Word.Application
    Dim objDoc As Word.Document

    objDoc = objWord.Documents.Add(strFileName)
    objWord.Documents(0).PrintOut()
    objWord.Quit(Word.WdSaveOptions.wdDoNotSaveChanges)

    objDoc = Nothing
    objWord = Nothing

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I'm not sure when doing this from .NET, but when I've had Word macros, I had to use ActiveDocument.PrintOut (False) to prevent Word from continuing the macro while the print job was going on. Otherwise, I got the same results you describe.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width