J
Joe Cilinceon
I have a form that lists several files that we print out when needed. These
are forms done in Word and saved to a forms folder. Now the problem is this
some of the forms (printed pages) ask if I want to save and some don't. The
code I use for this is below
Public Function PrintDoc(FileName)
Dim Name As String
Name = FileName
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open FileName
WordObj.PrintOut Background:=False
WordObj.Quit
Set WordObj = Nothing
End Function
Under the button properties for click I have the following line
PrintDoc("C:\Forms\DocumentName.doc")
As I said all of these forms are created in word and some do it (3) and
other just print the form with out a yes, no, cancel message box.
I'm using Office XP Developers. This has just started since I reinstalled
the software to a new computer.
are forms done in Word and saved to a forms folder. Now the problem is this
some of the forms (printed pages) ask if I want to save and some don't. The
code I use for this is below
Public Function PrintDoc(FileName)
Dim Name As String
Name = FileName
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open FileName
WordObj.PrintOut Background:=False
WordObj.Quit
Set WordObj = Nothing
End Function
Under the button properties for click I have the following line
PrintDoc("C:\Forms\DocumentName.doc")
As I said all of these forms are created in word and some do it (3) and
other just print the form with out a yes, no, cancel message box.
I'm using Office XP Developers. This has just started since I reinstalled
the software to a new computer.