locked
open file without adding to Windows 7 Jump List RRS feed

  • Question

  • Hello,

    In my .NET application I'm using the Office Interop libraries to open a lot of Word documents. For that, I'm using this code:

    Dim objWord As New Word.Application Dim document As Word.Document = objWord.Documents.Open(FileName:=filename, [ReadOnly]:=True, AddToRecentFiles:=False, Visible:=False) ... document.Close(SaveChanges:=Word.WdSaveOptions.wdDoNotSaveChanges)

    objWord.Quit(SaveChanges:=Word.WdSaveOptions.wdDoNotSaveChanges)

    Right now, those documents are not added to the "Recent Files" in Word's "File" menu, but they are added to Windows 7's Jump List (when I right click Word on the task bar, the Jump List is shown).

    Is there a way to prevent those files from being added to the jump list, or maybe remove them from the jump list?


    if a problem looks too big, break it into smaller objects

    Thursday, March 13, 2014 2:19 PM

All replies

  • See the SHAddToRecentDocs documentation for a discussion of how items are added to the shell's recent documents list and how this can be prevented. If Office is adding this on your behalf then you'll need to check with the Office developer forum to see if they know how to prevent the Office API from doing so.

    --Rob

    Monday, March 17, 2014 1:15 AM