Printing PDF Attachments and Closing

W

willy

Hey,
I have this handy little piece of code that will loop through my
attachments, open them up and print them. My only problem is in dealing with
Adobe. I have a peice of code that prints out .pdf files, but my problem
lies in closing adobe after the printing. I have tried using the SendKeys
function, but it is not working. If you could help me, I would appreciate it
very much.

Sub PrintPdfFile(sPath As String, sFileName As String)
strFilePath = sPath & "\" & sFileName

strAdobePath = "AcroRd32.exe"

Set objshell = CreateObject("Wscript.Shell")
objshell.Run strAdobePath & " /h " & strFilePath

Set objshell = Nothing

End Sub

What would I add to this peice of code to close down adobe? Thanks in
advance for the help.
Willy
 
Top