View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Help needed in hanging the default file location for Excel and Word


Sub ResetRecentPaths()
Const sOldPath$ = "C:\office documents"
Const sNewPath$ = "C:\Users\Kirk\Documents"

Dim sTarget$, v
For Each v In Application.RecentFiles
sTarget = Replace(v.Path, sOldPath, sNewPath)
Application.RecentFiles.Add sTarget
Next 'v
End Sub


Note that this approach will replace the RecentFiles list In Excel, and bumping
the list so Item(1) becomes Item(2) after adding. That said, it's not a good
approach!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion