I Need To Remove Save As Prompt Message When I Going To Print Word Doc

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.

Subject: I Need To Remove Save As Prompt Message When I Going To Print Word Doc

After printing, add the line:

word.ActiveDocument.Close False

Subject: I Want To Print PDF File Without displaying Print Dialog to user In web base application

Thanx, it work. Now I am success to converting word doc to PDF & attached that pdf file to document.

My application is totally on web base. Now I want to print perticular page from that PDF File without displaying

Print Dialog to user, does it possible in web base application.

Please Help me.