Hello,
I have a piece of code that prints all .rtf's in a folder via Word. I'd now like to do the same thing with snapshot files.
Can anyone tell me how I can change the code to do this
Thanks in advance
Ian
I have a piece of code that prints all .rtf's in a folder via Word. I'd now like to do the same thing with snapshot files.
Can anyone tell me how I can change the code to do this
Thanks in advance
Ian
Code:
Function PrintDoc1()
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
' The path to obtain the files.
sMyDir = "X:\PurchaseOrders\OrdersAuthByPIN\"
sDocName = Dir(sMyDir & "*.rtf")
While sDocName <> ""
' Print the file.
WordObj.Documents.Open sMyDir & sDocName
WordObj.PrintOut Background:=False
' Get next file name.
sDocName = Dir()
Wend
WordObj.Quit
Set WordObj = Nothing
End Function