none
Clear Un-Pinned Documents in Office 2007 MRU List w/o Regedit & w/o going to options?

    Question

  • Hello All,

    Is there an easier way to clear the MRU in office 2007 of all of the un-pinned entries without either going into the registry for each application, or going to options, setting it to zero (or however many pinned docs you have), then changing it back again?  I thought in previous versions of office there was a clear on exit setting, but I could be wrong. 

    If anyone could point me in the right direction, I would greatly appreciate it!

    Thanks,
    Kelly
    Thursday, June 11, 2009 2:53 AM

Answers

  • Hi Kelly,

    For a start, we have to first find out whether a document in the RecentFiles list is pinned or not .

    To do this, one would have to look at the following Registry keys (depending on the Office application).

    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU
    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\PowerPoint\File MRU
    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\File MRU

    Under these Keys, an item that is unpinned has the prefix [F00000000] and an item that is pinned has the prefix [F00000001]. For Word 2007,
    Eg. [F00000000][T01C9F3508F3F8DD0]*C:\Users\{Username}\Desktop\Document1.docx  - Unpinned
          [F00000001][T01C9EDE359FB99B0]*C:\Users\{Username}\Desktop\Document2.docx   - Pinned

    We could first store the complete path of each unpinned document in a list or array. You can then use the complete path to each unpinned document and compare it to each item present in the RecentFiles list of the application required.

    I'm using Word 2007 as an example. You could create a Word 2007 Add-In and use the following pseudo code in the ThisAddIn_Shutdown method, so that the recent documents list is cleaned up when you exit the application. Modify the code suitably for your purpose.

    Pseudo code

    foreach(Word.RecentFile item in this.Application.RecentFiles)
    {
    string compPath = item.Path + "\\" + item.Name;
    //--> gives the complete path of each item
    //To Do: Comparision
    //if compPath exists in the Unpinned Documents list, delete the item (item.Delete()) , else do nothing

    }


    Regards,
    Chaitanya


    Wednesday, June 24, 2009 6:58 PM
    Moderator

All replies

  • Hi Kelly,

    Thank you for contacting Inovate on Office Forum. We are working on this issue and will get back to you ASAP.

    Regards,
    Avinash
    Saturday, June 13, 2009 12:08 AM
    Moderator
  • Hi Kelly,

    For a start, we have to first find out whether a document in the RecentFiles list is pinned or not .

    To do this, one would have to look at the following Registry keys (depending on the Office application).

    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU
    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\PowerPoint\File MRU
    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\File MRU

    Under these Keys, an item that is unpinned has the prefix [F00000000] and an item that is pinned has the prefix [F00000001]. For Word 2007,
    Eg. [F00000000][T01C9F3508F3F8DD0]*C:\Users\{Username}\Desktop\Document1.docx  - Unpinned
          [F00000001][T01C9EDE359FB99B0]*C:\Users\{Username}\Desktop\Document2.docx   - Pinned

    We could first store the complete path of each unpinned document in a list or array. You can then use the complete path to each unpinned document and compare it to each item present in the RecentFiles list of the application required.

    I'm using Word 2007 as an example. You could create a Word 2007 Add-In and use the following pseudo code in the ThisAddIn_Shutdown method, so that the recent documents list is cleaned up when you exit the application. Modify the code suitably for your purpose.

    Pseudo code

    foreach(Word.RecentFile item in this.Application.RecentFiles)
    {
    string compPath = item.Path + "\\" + item.Name;
    //--> gives the complete path of each item
    //To Do: Comparision
    //if compPath exists in the Unpinned Documents list, delete the item (item.Delete()) , else do nothing

    }


    Regards,
    Chaitanya


    Wednesday, June 24, 2009 6:58 PM
    Moderator