Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post

    Compare Documents: how to clear the file section dropdowns?

    I can't find a way to do this so that when I try to run a compare, the dropdowns will list ONLY the files that are open.

    The people I work with tend to send me documents with long, complicated pathnames that change in unpredictable ways from one version of a document to the next. As a result, the dropdown often shows me several pathnames for a document, and it's very hard to figure out which one is the current version. If I could clear the list and make the old versions disappear, that would solve the problem!

  2. #2
    5 Star Lounger Lugh's Avatar
    Join Date
    Jun 2010
    Location
    Indy
    Posts
    620
    Thanks
    166
    Thanked 77 Times in 68 Posts
    I don't have an answer for your Q, but...
    Quote Originally Posted by jsachs177 View Post
    it's very hard to figure out which one is the current version.
    I'm probably misunderstanding, but wouldn't the file date in Windows Explorer tell you?
    Lugh.
    ~
    Windows 10 Pro x64 1607; Office 2016 (365 Home) x32; Win Defender, MBAM Pro

    ASRock H97 Anniversary; Xeon E3-1231V3 (like i7)
    Gigabyte GeForce GTX 970; 12GB Crucial DDR3 1600
    Logitech MX Master mouse; Roccat Isku kb

  3. #3
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    I think you do misunderstand, but it's not clear to me how. I can think of about six reasons why Windows Explorer wouldn't solve the problem even if the Compare Documents dropdown linked to it, which it doesn't. All of them are the kind of thing that's utterly obvious when tried, but totally confusing when explained. Perhaps if you explain how you think Windows Explorer would help, I can clarify.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I would assume that the list comes in part from the "Recently used" files stored in the registry. Perhaps you could wipe the list by clearing the registry list prior to opening the dialog. This is a pretty big hammer for the problem though.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    I agree, not the right tool for the job. I'm looking for a way to ease a difficult step in a routine process. Editing the registry would not do it.

    Apart from its drawbacks, I'm not sure it would even work. The Compare Files dropdown seems to be populated with files that are currently open and files that have been selected for compares in the recent past (using a definition of "recent" that is much too lax for my taste). If recently opened files are used at all (I'm not sure), removing them would not solve the problem.

    But your suggestion could lead to something useful. If the dropdown list is populated from something in the registry, it should be possible to write a program that clears it. That's not the ready-made solution I was hoping for, but it's worth investigating.

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I thought you might also be able to directly clear and write the list entries but I haven't found the right method yet. Something like this might get you started if you wanted to explore this further.
    Code:
    Sub ShowADialog()
      With Dialogs(wdDialogToolsCompareDocuments)
        '.Name.Clear  'doesn't work
        .Show
      End With
    End Sub
    The arguments on the dialog are listed on this page [URL="https://msdn.microsoft.com/en-us/library/office/ff845471.aspx[/URL]
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    I'll take a look at that. My days as a VBA wizard are far behind me, though, so it's not something I'll take to naturally.

    The dialog box is probably not the best point of attack. I'd like to limit the dropdowns to windows that are currently open. Using the approach I originally described, that should be trivial: if I wipe a list of recently compared documents and then start the Compare operation, Compare should add the open documents to the empty list of remembered documents, giving me exactly what I want. But if I wipe the list while opening the dialog box (or after opening it), I'll probably be wiping it after Word merges in the open documents. That would leave a completely empty list -- which would be even more useless than a list that includes half a dozen wrong files along with the two I want.

    I looked at Word's entries in the registry's HKEY_CURRENT_USER branch, but I didn't find anything that looked like a list of recently compared documents. That doesn't prove that it's not there -- I can't think of any other reasonable place for Microsoft to put it -- but if it's there, I didn't find it.

  8. #8
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I don't think Word writes to the MRU list until you save the document. This should mean that Word has to harvest both the MRU and the currently open documents to build the list it shows. My machine is crashing and burning when I search the registry for one of the filenames listed in the dialog (that is not open). I don't know why its crashing for me but that is how I would search for the MRU without knowing the key name.

    Another alternative is to avoid the dialog altogether. If you create a macro which takes the current activedocument and prompts with a list of the 'other' open documents then you have your two input files and the code is pretty simple. You will need a userform to show the list of docs.
    Last edited by Andrew Lockton; 2016-06-29 at 19:43.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

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