In agent I have create Word Object & access word file. through that object I give a print Command using default printer. I Have “Adobe PDF” default printer. When I run This agent on server, It gives Save as option as "Do You Want To Save
The File". I have no need to save that Word file, I want just to print word that file using Adobe PDF printer.
My Code is as Given Below.
Is it there any way to remove this type of massege.
Function word2PDFConversion(path As String ) As String
On Error Goto errorHandler
Dim path as String
Dim pdfFilePath As String
path="C:\Sample.doc"
Set word = CreateObject("Word.Application")
Set docs = word.Documents
Set Document = docs.Open( path )
word.ActiveDocument.PrintOut FileName=""
Call KillWordObject()
word2PDFConversion= path
Exit Function
errorHandler:
Call KillWordObject()
Exit Function
End Function
Please Help Me How To Remove This Save As Prompt. Message.