+ Reply to Thread
Results 1 to 6 of 6

Checking the TrackRevisions property of a closed document (Track Changes)

  1. #1
    Registered User
    Join Date
    06-07-2018
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    18

    Checking the TrackRevisions property of a closed document (Track Changes)

    Hi

    Does anyone know if it is possible to check the .trackrevisions property of a document (i.e., true/false) without actually opening it up? If so, I'd be grateful if someone could steer me in the right direction.

    Thank you.

    Dan

  2. #2
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,646

    Re: Checking the TrackRevisions property of a closed document (Track Changes)

    You could examine the contents of the settings.xml archive in a docx or docm document, to see whether the string <w:trackRevisions/> is present. A whole lot more work than simply opening and checking the document's .TrackRevisions state...
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2013; 365
    Posts
    221

    Re: Checking the TrackRevisions property of a closed document (Track Changes)

    As a completion to what macropod said, change the extension from docx/docm to zip and extract it in order to see the settings.xml file, and many other files for that matter.
    To show your appreciation
    Click ★ Add reputation!

  4. #4
    Registered User
    Join Date
    06-07-2018
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    18

    Re: Checking the TrackRevisions property of a closed document (Track Changes)

    Hello both. My apologies for the delay - I have only just now seen that I posted this question. Thank you for the suggestion about extracting the settings.xml file from the ZIP container - I hadn't thought of that. Admittedly, I haven't yet checked it either because - as you say - that would be a whole lot more effort than the task requires. I have code to that will extract the CustomUI files from the ZIP, so I can't imagine it would require much of an adjustment, but I think - on balance - it would just be easier to open the Word documents and 'brute force' my way through the process. Thank you again.

  5. #5
    Forum Guru macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,646

    Re: Checking the TrackRevisions property of a closed document (Track Changes)

    Quote Originally Posted by Dan_W View Post
    I have code to that will extract the CustomUI files from the ZIP, so I can't imagine it would require much of an adjustment, but I think - on balance - it would just be easier to open the Word documents and 'brute force' my way through the process.
    I'm not sure what you mean by "'brute force' my way through the process". All that's required is to test the revisions property. For example:
    ActiveDocument.Revisions.Count
    returns how many tracked changes the document contains. Similarly,
    ActiveDocument.TrackRevisions
    returns whether tracked changes is 'on'.

  6. #6
    Registered User
    Join Date
    06-07-2018
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    18

    Re: Checking the TrackRevisions property of a closed document (Track Changes)

    Hi Macropod - thank you kindly for your response above. To clarify, what I had hoped to be able to do was to check whether I could check the state of the TrackRevisions property in a set of closed word documents - the plan was to be able to check whether track revisions were on/off in any word documents attached to an email before the user clicked send. As you say, it isn't difficult to check the property, but I am envisaging a dozen or so word documents and wanted to avoid having to open each of them. What I was envisaging was something along the lines DSO OLE Document Properties Reader 2.1, which I first came across on Chip Pearson's site.

    I spoke without thinking when I said 'brute force', I apologise for causing confusion. What I meant by this is that rather than pull the document apart and check the settings.xml file for the state of the property, it would probably just be easier to loop through all the word documents, open them and check the property, then close them again.

    This was for a project I was doing for a friend, but it's no-longer required. I'm still interested to know if there is a solution along the lines of the DSO approach above, but I certainly don't want to bother anyone with it. Thanks again to you and Mrrr for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Get built in property details of a closed workbook
    By sloshpuppy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-12-2018, 02:23 AM
  2. [SOLVED] Checking if a certain document is already open
    By Jeppebob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2016, 08:19 AM
  3. Replies: 1
    Last Post: 11-07-2013, 12:54 AM
  4. Set Sharepoint Document property via VB
    By Yoam69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2012, 02:24 PM
  5. Extract from a closed document
    By CocoriCoy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2012, 09:46 AM
  6. track violations for property management?
    By Janet in forum Excel General
    Replies: 2
    Last Post: 07-30-2006, 07:00 AM
  7. Replies: 3
    Last Post: 04-04-2006, 07:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1