Reputation: 750
Some Time ago I asked a question on:
Keep Microsoft Word from adding files opened programmatically to its History
The answer to this, adding AddToRecentFiles:=False when opening and saving the file fixed the issue at that time.
Recently I recognized that the issue appeared again. The lines
worddoc = wordap.Documents.Open("C:\Tools\Temp\" & tempExportFileName & ".html", AddToRecentFiles:=False)
and
worddoc.SaveAs("C:\Tools\Out\" & tempExportFileName & ".html", FileFormat:=Word.WdSaveFormat.wdFormatHTML, AddToRecentFiles:=False)
Didn't changed at all from the time when it worked to now.
What do I need to do so that the files are, again, not added to the history?
Update:
Thanks to the answer of Eugene Astafiev my word it self does no longer display the .html files in its MRU-list. But if I right click the icon of word in the taskbar, all the .html files are there.
So how to fix this issue as well?
Upvotes: 0
Views: 409
Reputation: 49445
Office application keep the MRU (Most Recently Used) list in the windows registry. You can edit it programmatically.
See How to clear the Most Recently Used list (MRU) list in Office programs for more information.
Upvotes: 1