Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

AddToRecentFiles problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zSplash - 12 Mar 2008 22:34 GMT
I'm trying to programmatically create some text files so that they don't
appear in the Recent Documents list.  Here's the pertinent part of what I've
coded:

   ActiveDocument.SaveAs FileName:="\test\c" & nNum & ".txt",
fileformat:=wdFormatText, AddToRecentFiles:=False
   ActiveDocument.Close savechanges:=wdDoNotSaveChanges 'False

I read in the usergroups that both the SaveAs and the Close methods add to
the Recent Docs list.  Stepping through the code, after the "SaveAs" line,
the text filename does not appear in the Recent Docs list; when I step
through the next line, however, the textfilename does appear in the Recent
Docs list.

Any suggestions as to how to keep the text filename from appearing in the
Recent Docs list?

TIA
Graham Mayor - 14 Mar 2008 11:27 GMT
Using your code (but changing the filename for testing) the following does
not add to the recent file list in either Word 2003 or 2007?

With ActiveDocument
   .SaveAs FileName:="D:\My Documents\Test\Versions\Odd\" & nNum &
"test.txt", _
       FileFormat:=wdFormatText, AddToRecentFiles:=False
   .Close savechanges:=wdDoNotSaveChanges
End With

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I'm trying to programmatically create some text files so that they
> don't appear in the Recent Documents list.  Here's the pertinent part
[quoted text clipped - 14 lines]
>
> TIA

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.