troubleshooting Question

Close PDF file without Save prompt

Avatar of Michael Gjernes
Michael GjernesFlag for Canada asked on
OutlookAdobe Acrobat
3 Comments1 Solution3096 ViewsLast Modified:
I'm using Outlook2000 and Acrobat 7 Pro, I have a VBA script that watches a Outlook Folder for new mail then prints the attachments, either PDF or TIFF.  It uses Acrobat 7 Pro to open and print the attachments, the issue is that Acrobat then prompts to save the file before closing. Is there anyway I can disable this prompt, either from within Adobe Acrobat or from the VBA script?
Below is the print sub from my script.
I've tried the AcroApp.Close call but it doesn't work.

Many thanks!

Sub PrintPDF2(ByVal FileName As String, Optional Copies As Long = 1)
     '++ Prints the PDF files using a command line.
     '++ Written by Masaru Kaji aka Colo
     '++ Syntax
     '++ FileName : Required String expression that specifies a file name
     '++           - may include directory or folder, and drive..
     '++ Copies : Optional Long. The number of copies to print.
     '++          If omitted one copy is printed.
    Dim cnt As Long
    Dim myShell
    Set myShell = CreateObject("WScript.Shell")
    Dim Acro As AcroApp
    Set Acro = New AcroApp
    For cnt = 1 To Copies
         'opens Acrobat and prints file
        'myShell.Run ("""C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe""" & "/t " & FileName)
        myShell.Run ("""C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe""" & "/t " & FileName)
     'tidy up
End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros