Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:52:08+00:00 2026-05-24T02:52:08+00:00

I am programmatically generating Office Documents (in my case Word or Excel 2007) using

  • 0

I am programmatically generating Office Documents (in my case Word or Excel 2007) using automation in VBA (in this example MS Access 2007, but that should not change much) under Windows 7. This works fine.

Since the documents are automatically generated I don’t want them to show up in the recent lists. For recent list in Word I can just add “AddToRecentFiles:=False” when saving the document (see example) or I could delete the 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 I could not find a way to disable the recent lists from Windows 7 (i.e. jump list with recent items in the taskbar for Word or last used folders in Explorer and recent list for Word in Start menu).
Example of a Windows7-jumplist for Word 2007 filled up with links to autogenerated documents

I am aware these lists are stored under %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations and I have found out that to manipulate Jumplist there is the “WindowsAPICodePack” (that I can not use from VBA, right?).

To add an item the the recent list I can use the old API SHAddToRecentDocs from the “shell32.dll” library but deleting with this API function does not work anymore as it only seems to affect the entries in the old “/recent” folder (and even deletes everything what is not my intention). Presentations on the Windows 7 Taskbar API too only seem to mention how to add items but not how to avoid doing so or to delete specific entries.

Am I missing something or is there no — easy and ideally usable from within VBA — way to manipulate (or temporerally disable) the recording Windows 7 does?

Kind regards
Andreas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:52:09+00:00Added an answer on May 24, 2026 at 2:52 am

    I have encountered a similar problem when programmatically dealing with Word and other office documents with Sharepoint.

    You can access the JumpList object via the PresentationFramework library (.Net 4) or the WindowsAPICodePack for 3.5 (and possibly earlier) however there does not appear to be a way to programmatically delete JumpListItems.

    I found a post which suggests that you can disable Word from adding items to the JumpList via registry key. http://www.add-in-express.com/forum/read.php?PAGEN_1=2&FID=5&TID=8124#nav_start This shouldn’t be too hard to do programmatically (if you have admin rights on the machine generating the documents).

    I haven’t had a chance to try out whether this works yet. If you find a more elegant solution please let me know!

    Update: In my solution I ended up regenerating the jumplist based on the Word Recent files list (I looped backwards through the internal Word recent files list and called JumpList.AddToRecent method for each file).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am programmatically generating an Office Open XML document (Word 2007 format), and would
Using jQuery I'm programmatically generating a bunch of div 's like this: <div class=mydivclass
we are generating an Excel report and we need to sort the data programmatically
My application is programmatically generating some html code like this: <div class=container> <div class=class1>
I'm generating a PPT presentation through vba in excel, everything is working just fine
I've been working on a process for programmatically generating Visual Studio projects using GetProjectTemplate.
I am generating audio programmatically. I hear gaps of silence between my buffers. When
What's a good method of programatically generating etag for web pages, and is this
I'm programmatically adding ToolStripButton items to a context menu. That part is easy. this.tsmiDelete.DropDownItems.Add(The
Is it possible to programmatically generate markers in Google? For example, I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.