taskbar - Disable jumplist entries in Windows 7 for VBA-generated Office documents -


i programmatically generating office documents (in case word or excel 2007) using automation in vba (in example ms access 2007, should not change much) under windows 7. works fine.

since documents automatically generated don't want them show in recent lists. recent list in word can add "addtorecentfiles:=false" when saving document (see example) or delete entries afterwards through "application.recentfiles ..."

my code

set objword = createobject("word.application")  set curdocument = objword.documents.add  curdocument.saveas filename:=folder + "text.doc", fileformat:=wdformatdocument,              addtorecentfiles:=false curdocument.close 

problem is not find way disable recent lists windows 7 (i.e. jump list recent items in taskbar word or last used folders in explorer , recent list word in start menu). example of windows7-jumplist word 2007 filled links autogenerated documents

i aware these lists stored under %appdata%\microsoft\windows\recent\automaticdestinations , have found out manipulate jumplist there "windowsapicodepack" (that can not use vba, right?).

to add item the recent list can use old api shaddtorecentdocs "shell32.dll" library deleting api function not work anymore seems affect entries in old "/recent" folder (and deletes not intention). presentations on windows 7 taskbar api seem mention how add items not how avoid doing or delete specific entries.

am missing or there no -- easy , ideally usable within vba -- way manipulate (or temporerally disable) recording windows 7 does?

kind regards andreas

i have encountered similar problem when programmatically dealing word , other office documents sharepoint.

you can access jumplist object via presentationframework library (.net 4) or windowsapicodepack 3.5 (and possibly earlier) there not appear way programmatically delete jumplistitems.

i found post suggests can disable word adding items jumplist via registry key. http://www.add-in-express.com/forum/read.php?pagen_1=2&fid=5&tid=8124#nav_start shouldn't hard programmatically (if have admin rights on machine generating documents).

i haven't had chance try out whether works yet. if find more elegant solution please let me know!

update: in solution ended regenerating jumplist based on word recent files list (i looped backwards through internal word recent files list , called jumplist.addtorecent method each file).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -