Acrobat won't release a file

Everyone,
I'm using visual basic to manipulate a pdf file opened in Acrobat. The code below opens the file and searches for a text string. If it finds the text string, the pages containing are deleted. Once the text string is no longer found, the file is closed, the application is hidden and then exited. All of this works just fine.
My problem occurs with the last line of code. I want to rename the file and place it in another directory. However, I get a file path error which indicates to me that Acrobat is still holding on to the recently closed file.
Is there a method to get Acrobat to release the file? Any help is appreciated.
MikeCJ
Dim pdfAcroExchApp As Acrobat.AcroApp
Dim pdfAVDoc As Acrobat.AcroAVDoc
Dim pdfPDDoc As Acrobat.AcroPDDoc
Dim pdfPath, sText As String
Dim foundText, Rsp, x As Integer
Dim check As Boolean
'Check establishes whether an MSDS has a chemical Evaluation form attahced.
check = True
Do While check = True
    'If the text string frmChemEval is found it is a certainty the MSDS file contains a Chemcial Evaluation Form
    sText = "frmChemEval"
    pdfPath = "Q:\" & Form_frmControlPanel.fldautoMSDSNbr & ".pdf"
    'set pdfAVDoc for searching
    Set pdfAcroExchApp = CreateObject("AcroExch.App")
    Set pdfAVDoc = CreateObject("AcroExch.Avdoc")
    pdfAVDoc.Open pdfPath, ""
    pdfAcroExchApp.Show
    Set pdfPDDoc = pdfAVDoc.GetPDDoc
    Set pdfPDDoc = CreateObject("AcroExch.PDDoc")
    pdfPDDoc.Open pdfPath
    x = pdfPDDoc.GetNumPages
    foundText = pdfAVDoc.FindText(sText, 0, 1, 1)
        If foundText = -1 Then
            check = True
        Else
            check = False
        End If
        If check = True Then 'The MSDS already contains a Chemical Evaluation Form
                pdfPDDoc.AcquirePage pdfPDDoc.GetNumPages - 1
                pdfPDDoc.DeletePages pdfPDDoc.GetNumPages - 1, pdfPDDoc.GetNumPages - 1
        End If
Loop
pdfPDDoc.Close
pdfAcroExchApp.Hide
pdfAcroExchApp.Exit
Name (pdfPath) As ("Q:\MSDS Temp\MSDStoMerge.pdf")

Bernd,
It was an omission on my part. I've included a save statement just before the close statement. Any thoughts of the "releasing" issue?
Thanks,

Similar Messages

  • Drag and drop, it won't release the file.

    Upon booting up my 15"MBP with osx Lion, when I drag and drop a file, it won't release the file.  This happens across files, other programs, etc. The only fix is to put the computer to "sleep", then when it turns back on drag and drop works fine.
    Is there a fix for this issue?  It happens on every boot up.

    To clarify, it's not just Air DIsplay but any third-party video driver. When any of these is installed (not even necessarily active) on a MBP5,1, MBP5,2, or MBP5,3, you'll have this issue. The workaround is detailed here: Air Display on Lion with NVIDIA 9400/9600
    Dave at Avatron

  • Uploading file with Java: Java won't release the file.

    I'm trying to upload .log files to a webbsite using a form. It uploads fine, that's not the problem. The problem is that I want it to delete the file afterwards to save disk space, but the application doesn't release it. I thought I might just be doing something wrong with the delete function, but even deleting it manually through Windows doesn't work. Any ideas?
    import java.io.*;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.*;
    public class ClientHttpRequest
        protected void connect()
            throws IOException
            if(os == null)
                os = connection.getOutputStream();
        protected void write(char c)
            throws IOException
            connect();
            os.write(c);
        protected void write(String s)
            throws IOException
            connect();
            os.write(s.getBytes());
        protected void newline()
            throws IOException
            connect();
            write("\r\n");
        protected void writeln(String s)
            throws IOException
            connect();
            write(s);
            newline();
        protected static String randomString()
            return Long.toString(random.nextLong(), 36);
        private final void boundary()
            throws IOException
            write("--");
            write(boundary);
        private final void postCookies()
            StringBuffer stringbuffer = new StringBuffer();
            for(Iterator iterator = cookies.entrySet().iterator(); iterator.hasNext();)
                java.util.Map.Entry entry = (java.util.Map.Entry)iterator.next();
                stringbuffer.append(entry.getKey().toString() + '=' + entry.getValue());
                if(iterator.hasNext())
                    stringbuffer.append("; ");
            if(stringbuffer.length() > 0)
                connection.setRequestProperty("Cookie", stringbuffer.toString());
        public void setCookie(String s, String s1)
            throws IOException
            cookies.put(s, s1);
        public void setCookies(Map map)
            throws IOException
            if(map == null)
                return;
            } else
                cookies.putAll(map);
                return;
        public void setCookies(String as[])
            throws IOException
            if(as == null)
                return;
            for(int i = 0; i < as.length - 1; i += 2)
                setCookie(as, as[i + 1]);
    private final void writeName(String s)
    throws IOException
    newline();
    write("Content-Disposition: form-data; name=\"");
    write(s);
    write('"');
    public void setParameter(String s, String s1)
    throws IOException
    boundary();
    writeName(s);
    newline();
    newline();
    writeln(s1);
    private static final void pipe(InputStream inputstream, OutputStream outputstream)
    throws IOException
    byte abyte0[] = new byte[0x7a120];
    int j = 0;
    int i;
    synchronized(inputstream)
    while((i = inputstream.read(abyte0, 0, abyte0.length)) >= 0)
    outputstream.write(abyte0, 0, i);
    j += i;
    outputstream.flush();
    abyte0 = null;
    public void setParameter(String s, String s1, InputStream inputstream)
    throws IOException
    boundary();
    writeName(s);
    write("; filename=\"");
    write(s1);
    write('"');
    newline();
    write("Content-Type: ");
    URLConnection _tmp = connection;
    String s2 = URLConnection.guessContentTypeFromName(s1);
    if(s2 == null)
    s2 = "application/octet-stream";
    writeln(s2);
    newline();
    pipe(inputstream, os);
    newline();
    public void setParameter(String s, File file)
    throws IOException
    setParameter(s, file.getPath(), ((InputStream) (new FileInputStream(file))));
    public void setParameter(String s, Object obj)
    throws IOException
    if(obj instanceof File)
    setParameter(s, (File)obj);
    else
    setParameter(s, obj.toString());
    public void setParameters(Map map)
    throws IOException
    if(map == null)
    return;
    java.util.Map.Entry entry;
    for(Iterator iterator = map.entrySet().iterator(); iterator.hasNext(); setParameter(entry.getKey().toString(), entry.getValue()))
    entry = (java.util.Map.Entry)iterator.next();
    public void setParameters(Object aobj[])
    throws IOException
    if(aobj == null)
    return;
    for(int i = 0; i < aobj.length - 1; i += 2)
    setParameter(aobj[i].toString(), aobj[i + 1]);
    public InputStream post()
    throws IOException
    boundary();
    writeln("--");
    os.close();
    return connection.getInputStream();
    public InputStream post(Map map)
    throws IOException
    setParameters(map);
    return post();
    public InputStream post(Object aobj[])
    throws IOException
    setParameters(aobj);
    return post();
    public InputStream post(Map map, Map map1)
    throws IOException
    setCookies(map);
    setParameters(map1);
    return post();
    public InputStream post(String as[], Object aobj[])
    throws IOException
    setCookies(as);
    setParameters(aobj);
    return post();
    public InputStream post(String s, Object obj)
    throws IOException
    setParameter(s, obj);
    return post();
    public InputStream post(String s, Object obj, String s1, Object obj1)
    throws IOException
    setParameter(s, obj);
    return post(s1, obj1);
    public InputStream post(String s, Object obj, String s1, Object obj1, String s2, Object obj2)
    throws IOException
    setParameter(s, obj);
    return post(s1, obj1, s2, obj2);
    public InputStream post(String s, Object obj, String s1, Object obj1, String s2, Object obj2, String s3,
    Object obj3)
    throws IOException
    setParameter(s, obj);
    return post(s1, obj1, s2, obj2, s3, obj3);
    private final void _mththis()
    os = null;
    cookies = new HashMap();
    boundary = "---------------------------" + randomString() + randomString() + randomString();
    public ClientHttpRequest(URLConnection urlconnection, String s)
    throws IOException
    _mththis();
    connection = urlconnection;
    urlconnection.setDoOutput(true);
    urlconnection.setRequestProperty("User-Agent", s);
    urlconnection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
    public ClientHttpRequest(URL url, String s)
    throws IOException
    this(url.openConnection(), s);
    public ClientHttpRequest(String s, String s1)
    throws IOException
    this(new URL(s), s1);
    private static Random random = new Random();
    URLConnection connection;
    OutputStream os;
    Map cookies;
    String boundary;

    And you're closing the inputstream to the file?Thanks, I knew it was something simple like that but I'd been staring at it so long I couldn't see it. I guess a fresh pair of eyes helps.

  • Acrobat won't recognize .indd files when combining

    Hi
    Individually Acrobat will convert these files into a .pdf, but when I choose to select all the .indd files using the 'combine' option and after loading all the files in the window and then 'select' merge into a single file' Acrobat gives a message it can't find the application that created these .indd files.
    Any ideas?
    Thanks..

    You should not be using Acrobat to create pdfs from InDesign. Each of the InDesign files should be exported to pdf. Then if you can combine the resultant pdfs into a single pdf in Acrobat.

  • Acrobat won't open pdfs on clicking file icon and won't quit with key command

    Acrobat won't open pdfs on clicking the file icon and won't quit with key command.

    IF you command I on any .pdf file, what does open with show?
    Restore the Acrobat preferences files (Mac OS)
    Restore the Acrobat preferences files to eliminate problems caused by a damaged preferences file.
    Note: Re-creating the Acrobat preferences files restores settings to their defaults. 
    Quit Acrobat.
    Drag the following files from the Users/[Username]/Library/Preferences folder to the Desktop:
    Acrobat WebCapture Cookies
    com.adobe.Acrobat.Pro.plist or com.adobe.Acrobat.Pro_x86_9.0.plist
    Acrobat Distiller Prefs and com.adobe.Acrobat.Pro.plist (if you are troubleshooting an issue with Distiller)
    The Acrobat folder, which contains preferences for forms (MRUFormsList), collaboration (OfflineDocs), and color settings (AcrobatColor Settings.csf)
    Restart Acrobat

  • Downloaded Adobe acrobat OK but the .dmg file won't open?

    downloaded Adobe acrobat OK but the .dmg file won't open?

    And what exact error do you get? What version of OSX? What Mac?
    Mylenium

  • How come pages won't open PDF files made by Pages?

    How come pages won't open PDF files made by Pages?
    I have files I made with Pages and exported as PDF but I can't open them with pages to edit?
    Also, where are the recent files created by pages located? Can't find those to open either..

    Hi Tom,
    I was delighted when I signed up for Pages. Clunky yes, but it worked. I've been a graphic designer on a Mac for 25 plus years and have logged too many horror stories of "upgrade" wars which cost me massive lost time, data and money forcibly extracted just so I could finish a project.
    When I first used Pages in April of 2012? or there about, I was able to open Word documents exported to .pdf format, emailed to me, which I then dragged into Pages. I could make the changes I needed to make, export as a .pdf, return it back to my client which they could then edit on whatever it was they were using. I'm not a neophyte with this. I've had Original Photoshop as a stand alone, Quark (which locked users out 6 months after I purchased it.) Quark again, Freehand, Pagemaker, Illustrator, Photoshop again, Creative Suite for several upgrades, Acrobat Pro. 2 years ago I lost 6 years of Quicken data and had to and "upgrade" start over. This last go around I  had to "upgrade" my Apple ID - yes I had 2 on purpose, lost my Pandora One and my ability to get into the Tulsa County Library website.
    At this point, I'm retired and feel like what I've paid for in the past should WORK today. I have a 100+ page cookbook in Quark which I was able to export as a .pdf, that I've lost the tags too, Easier to start over. I have artwork that is hundreds of megs in Photoshop. Not the least bit interested in anybody's "cloud".
    Thanks for letting me vent. I'm determined to keep my equipment and software up to date so I can enjoy the skills I've acquired, but I completely cringe at Apple's antics. I truly hate it when I have to respond to some new "tip" or product offer. BooHiss. Happy Turkey Day. Pages is a "turkey" program.
    Best regards, mbd

  • I used to use the free version of Adobe Reader to convert my publisher files to pdf files. When I was making a booklet for our hockey team, it said I had to buy it. Now I bought it and it won't convert the files. I am ready to throw this computer out the

    I used to use the free version of Adobe Reader to convert my publisher files to pdf files. When I was making a booklet for our hockey team, it said I had to buy it. Now I bought it and it won't convert the files. I am ready to throw this computer out the window!! Can you tell me what is the problem? No it does not exceed 100 M. either.

    Adobe Reader never converted Publisher files to PDF, for free, never. I suspect you use to have the (paid for) Adobe Acrobat. Sometimes people have Acrobat (more than $300 worth) and install Adobe Reader over the top, losing that valuable software.
    That said, if you subscribed to PDF Pack it should do this conversion. What exactly happens now.

  • Acrobat won't save any more links in a PDF. Why?

    I am adding links to a PDF file. I have done several, including the index of the file. Acrobat won't save any more though. Why?

    Sara,
    The Save As allows me to save the changes, but the regular save will still not function. I seem to recall a similar issue with the last version of this document, with a similar number of links.
    Thanks,
    Clint
    Clint Brooks
    Instructional Designer
    Vines 145
    University of Arkansas at Fort Smith
    (479)788-7335
    [email protected]
    clint.brooks on Skype

  • Adobe Acrobat 11 will not open files in IE 10.0.06

    Adobe Acrobat 11 will not open files in IE 10.0.06. Problem started about 2 months ago. It can open older files on computer but cannot open or downloadd any from internet. Using Office 2010. Already spent an hour with my computer tech support under warranty. Please help identify issue. Thanks

    As a web designer - IMHO, Internet Exploder is absolute garbage disguised as software. This (and thousands of other threads in this and many other forums throughout the web) is just more proof of that. I've used Firefox since 2002 when it was still called Mozilla. It does about a million things IE can't and won't, and does them better, faster, and more sensibly.
    Microsoft KNOWS that most corporate workstations have Windows and most I/T departments forbid installation of unapporved software, including browsers, so (by a very slim margin) IE is still the most used browser in the world, but... that doesn't by any means make it the best choice. Because they know so many people are literally FORCED to use it at work, they will not make it more functional than they absolutely have to, because they don't care if people like it or not, when they have no other choice.
    On a home computer, it's different, and that's why Firefox is just a fraction of a percentage point behind IE in worldwide use, and thanks to iPhones, Safari is rapidly climbing the numbers too.
    Rather than trying to work around something that even Microsoft won't bother to fix, abandon their junk and go with Firefox, Opera, Chrome or Safari. It won't be long till you're glad you did.

  • Adobe reader won't open PDF file

    I have Adobe Reader 9 and Windows 8 on a Dell computer. When I try to open a PDF file from a website it sends me to my Library on my computer and won't open the file. If I try to open a PDF file from my Desktop, it opens OK. What can I do to fix this?

    Do you use Firefox' own PDF viewer, or the Adobe Reader plugin?  See http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Can acrobat X standard convert dwg files to pdf

    can acrobat X standard convert dwg files to pdf

    Acrobat X's PDFMaker supports some releases of AutoCAD.
    You may want to look over the information here:
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html 
    Be well...

  • Acrobat won't hide comments

    I know this has been brought up before, but the fact that Acrobat X won't filter comments under checked "All, Checked, or Unchecked" is really annoying.
    Its so fundamental to the way publishing works to be able to check a comment once you've completed the action, thats its quite detramental to the way Acrobat now works. Is this issue being looked into at all, or any updates on thew way for Acrobat X?
    The thing is, id you choose to filter any of the other options (date/user) thats works immediately.

    IF you command I on any .pdf file, what does open with show?
    Restore the Acrobat preferences files (Mac OS)
    Restore the Acrobat preferences files to eliminate problems caused by a damaged preferences file.
    Note: Re-creating the Acrobat preferences files restores settings to their defaults. 
    Quit Acrobat.
    Drag the following files from the Users/[Username]/Library/Preferences folder to the Desktop:
    Acrobat WebCapture Cookies
    com.adobe.Acrobat.Pro.plist or com.adobe.Acrobat.Pro_x86_9.0.plist
    Acrobat Distiller Prefs and com.adobe.Acrobat.Pro.plist (if you are troubleshooting an issue with Distiller)
    The Acrobat folder, which contains preferences for forms (MRUFormsList), collaboration (OfflineDocs), and color settings (AcrobatColor Settings.csf)
    Restart Acrobat

  • Help! Acrobat won't down sample documents, what is going on...

    Hi,
    maybe someone out there has experience with this.
    I have CS4, but Acrobat won't 'optimize' or export out of other programs with optimized settings.
    It goes through all the motions, acting like it is doing waht it should, but ends up not effecting the file size at all.
    Like it goes through and does all the thinking, but the result is no different, it's missing a crucial step at the end.
    Is there a patch or something?
    Anyone else?
    A few years back I had this issue at another job on a mac, but...i didn't fix it then either, just quit.
    I'm on Windows 7 btw.
    Any insight would be greatly appreciated!
    Thanks,
    G

    Here's an update:
    Now the light is not blinking. It's a solid, consistant green. I don't know if it helps to narrow it down or anything, but I just figured I'd mention it.

  • CS6 - Adobe Acrobat Won't Activate?

    I bought CS6 - Design Standard, which according to the Adobe website comes with Acrobat.
    CS6 Design Standard
    Express your wildest ideas at lightning speed with Adobe® Creative Suite® 6 Design Standard software. Work blazingly fast on complex files in Adobe Photoshop® and Illustrator®. Use familiar tools in Adobe InDesign® for greater control and efficiency for page layout and preparation for high-quality print production. Go beyond print to craft media-rich publications for iPad and other tablet devices.
     Adobe® Creative Suite® 6 Design Standard software includes:
    Photoshop CS6
    Acrobat® X Pro
    Integrates with:
    Digital Publishing Suite
    Illustrator CS6
    Bridge CS6
    InDesign CS6
    Media Encoder CS6
    Why is it then that my Acrobat won't activate with my CS6 licence?

    Hi,
    Are you using Acrobat desktop application or are you subscribing to Acrobat Plus?
    If you are using Acrobat desktop applicaiton I will move your posting to Acrobat Forum as you posted this at Acroat.com Forum, which is online service.
    Please let me know.
    Hisami

Maybe you are looking for

  • How do I connect to the Desktop of my PC?

    I have no trouble networking between my Windows XP on the PC and the mac. However, on the PC, I can only open the "Local Disk" with its folders and files since the Local Disk has the "Sharing" capability. I would like to be able to see the Desktop of

  • Fire-wire device usage at MacMini Late2014

    Dear all. As for Mac Mini late 2014, I can see fire-wire port is removed. Is there any way to use my fire-wire device such as a fire-wire audio interface or fire-wire external HDD? Can I use these devices by thunderbolt to firewire adapter that sold

  • Removing AddressBar, StatusBar from Default Application Window

    Hi, I want to hide address bar from default application window! This application would be triggered from a link in another (web dynpro / non-web dynpro) application. And user should not be able to see where he is gets navigated. So, is there anyway w

  • Withholding Tax on PO

    Hi Guys, We setup vendor master with withholding tax codes.When we are raising PO for that vendor the tax was not getting calculated.Are we missing any config? Any help will be greatly Appreciated. Thanks,

  • PS characteristic in FM

    WE are currently on ECC 6.0, EHP4 and I need to find a way to get the PS characteristic in a r.painter FM report built under the 4FM library. Under the Gen. Data Selection I do not have the WBS characteristic as an available one. Is it possible to ma