"Tracking Changes" stops an auto export as PDF macro.

  • I have tried every possible variation I can think of to solve this. I am trying to run a macro through VBA that finds all doc/x files, opens them, exports as a PDF, and then kills the doc/x file(s). Everything works perfectly except for the automation! Every few documents has "Tracking Changes" turned on, and this prompts the user to make sure they want to save the file.

    What I have tried:
    - Disabling the prompt through the Trust Center
    - Word.Application.DisplayAlerts = False

    Since I work on a closed and classified system, I can't transfer the code in its entirety, but this is almost exactly how I approached this problem:

    Any help is appreciated.

    Sorry for the funky spacing, this forum keeps messing up my post.

  • Re: "Tracking Changes" stops an auto export as PDF macro.

    It still prompts.

    If I open the file myself and CTRL+S, the very first thing that happens is the alert dialog about tracked changes. If I can disable this or bypass it, it would help immensely. As I mentioned, I disabled the prompt through the Trust Center, but it still alerts.

    Thank you for your input S M C.

  • Re: "Tracking Changes" stops an auto export as PDF macro.


  • Re: "Tracking Changes" stops an auto export as PDF macro.

    I've tried both .Saved and .TrackRevisions, and neither prevent the prompt. I am noticing the properties I define for wordApp/wordDoc don't seem to be setting in the new window, since the window opens only a reading pane, is read-only, and non-interactable, so I typically have to Alt+F4 or hit the [X], upon which it asks if I want to save my changes? This seems incredibly odd.

    Could it be how I open the document?

    I forgot to mention: In the order of functions, the PDF is never created, meaning it never gets past the "ExportAsFixedFormat" line.

  • Re: "Tracking Changes" stops an auto export as PDF macro.

    Does that mean you get an error at that line? Are you able to create a PDF through code at all? If not download the PDF COM Add-in and install. You should now be able to convert the range to PDF using the vba

  • Re: "Tracking Changes" stops an auto export as PDF macro.

    Yes all the other files create PDF's successfully. I have tried ReadOnly, but it still gives me a prompt. I have solved this issue rather sloppily, considering I am dealing with archived classified documents, the revisions/changes are no longer of concern so my new code (that was successful) is:

  • Re: "Tracking Changes" stops an auto export as PDF macro.

    The .ExportAsFixedFormat line has to come only after a file has no revisions or alterations, so the .Save has to occur before it if there are any revisions. These systems' global settings are rather screwy, so this may not be the best approach, but it works.

    Thank you for all the help and bouncing of ideas, if I find a more elegant way to solve this in the future I will update.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!