K
KitCaz
Recently someone provided some succinct code to print Word documents from VB
code. Can someone provide similar code for printing Excel files?
e.g. Word code:
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open "c:\yourfile.doc"
WordObj.PrintOut Background:=False, Copies:=1
WordObj.Quit
Set WordObj = Nothing
code. Can someone provide similar code for printing Excel files?
e.g. Word code:
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open "c:\yourfile.doc"
WordObj.PrintOut Background:=False, Copies:=1
WordObj.Quit
Set WordObj = Nothing