|
-
May 31st, 2005, 02:39 PM
#1
Addtorecentfiles trouble
Hi,
More specifically, I was wondering if there are any options which need to be set so that the Addtorecentfiles parameter of the Documents.Open method works, or any activities which stop it from working. I find that the file I want not to appear in the Recent Files list persists in doing so. I've checked all my uses of Documents.Open, and this parameter is always set False. Also, just in case it does something different should the file already be named in the list, I've opened lots of Word documents to get it out of the Recent files list, then tried my code again and it just puts the file back on the list again.
Any ideas?
Cheers
zaza
Last edited by zaza; Jun 1st, 2005 at 01:52 PM.
-
May 31st, 2005, 03:44 PM
#2
Re: Addtorecentfiles trouble
The recent files list stores in three places:
C:\Documents and Settings\VB-Guru\Recent
C:\Documents and Settings\VB-Guru\Application Data\Microsoft\Office\Recent
Also, a section in the Registry. I forgot where but I had assisted in a thread on it before so amy a search would show it location.
Try clearing out your files and testing again. It could be that its being added from the cache.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2005, 03:48 PM
#3
Re: Addtorecentfiles trouble
 Originally Posted by RobDog888
The recent files list stores in three places:
C:\Documents and Settings\VB-Guru\Recent
C:\Documents and Settings\VB-Guru\Application Data\Microsoft\Office\Recent
Also, a section in the Registry. I forgot where but I had assisted in a thread on it before so amy a search would show it location.
Try clearing out your files and testing again. It could be that its being added from the cache.
What about setting the 4th parameter of the Documents.Open to False, would that not work?
VB Code:
Dim objExample As Object
objExample = Documents.Open(FileName:="D:\MS Office\My Documents\Other\Complete Idiots Guide To DVD Remote.doc", AddToRecentFiles:=False)
Cheers,
RyanJ
Last edited by sciguyryan; May 31st, 2005 at 03:53 PM.
-
May 31st, 2005, 03:53 PM
#4
Re: Addtorecentfiles trouble
Zaza is already doing that. Maybe there is something else going on?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2005, 04:02 PM
#5
Re: Addtorecentfiles trouble
 Originally Posted by RobDog888
Zaza is already doing that. Maybe there is something else going on?
OOps, sorry I did not see that bit....
Cheers,
RyanJ
-
May 31st, 2005, 04:15 PM
#6
Re: Addtorecentfiles trouble
No need to apologize, just was pointing it out hoping to help narrow it down to the issue.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2005, 04:26 PM
#7
Re: Addtorecentfiles trouble
-
May 31st, 2005, 04:50 PM
#8
Re: Addtorecentfiles trouble
I found it. It was in the General Developers Forum. 
Recent Files Locations
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 31st, 2005, 07:10 PM
#9
Re: Addtorecentfiles trouble
if you saveas it can also addtorecentfiles
also to remove
RecentFiles(2).Delete
pete
-
Jun 1st, 2005, 01:51 PM
#10
Re: Addtorecentfiles trouble
Hi,
Aha, nice work westconn1. Actually, I wasn't using saveas. I was, however, including a sneaky Save option in the "Close" method - it was this that was causing it to be added to the files list. Solution: save it first using SaveAs with Addtorecentfiles set to false, then close it without saving.
Job done. Nice one.
zaza
-
Jun 1st, 2005, 09:59 PM
#11
Re: Addtorecentfiles trouble
any save method that uses options is really saveAs
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|