Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 15th 19, 04:30 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2011
Posts: 8
Default Help needed in hanging the default file location for Excel and Word

I first started using Office 4.3 (?) when it had Word 2.0 in
1993. I have always created my own folder in c:\office documents
to store my work products. I have never used the Documents area
that Windows created.

I am now using Office 365 MSO (16.0.11126.20192) 32-bit in a
Windows 10 Pro 1809 setup. I finally decided to utilize the
Documents area. So I moved all my Word and Excel files to the
Documents folder: C:\Users\Kirk\Documents. Everything search
confirms that all the .docx and .xlsx files are there.

I now have a problem. When I go into Word or Excel and try to
bring up a file, it rejects my request, saying that it can't find
my old default location. When I use the Help function in Excel,
it misleads by telling me to go: File, Options, General, Info
Path Options, more options. However, there is NO Info Path
Options choice available in either Excel or Word. When I go:
File, Options, Save I am presented with a chance to set the
Default Local file location. I change that and click Okay, but
the next time I try to get that file, it says that it can't find
it, referring to the old file location. The error message doesn't
tell me how to change the default location of moved files.

When I try to open a file that I've changed the default location
on, it rejects me. I can Browse to that file at
C:\Users\Kirk\Documents and open it, and I can look at the File,
Options, Save, default local file location, and it says that is
C:\Users\Kirk\Documents. But that new location doesn't "take."

What am I doing wrong? Is there a way to change the file
location so that I can open my files without having to browse to
them each time?

Thanks in advance for any help.

  #2   Report Post  
Old January 15th 19, 07:25 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 982
Default Help needed in hanging the default file location for Excel and Word

I first started using Office 4.3 (?) when it had Word 2.0 in
1993. I have always created my own folder in c:\office documents
to store my work products. I have never used the Documents area
that Windows created.

I am now using Office 365 MSO (16.0.11126.20192) 32-bit in a
Windows 10 Pro 1809 setup. I finally decided to utilize the
Documents area. So I moved all my Word and Excel files to the
Documents folder: C:\Users\Kirk\Documents. Everything search
confirms that all the .docx and .xlsx files are there.

I now have a problem. When I go into Word or Excel and try to
bring up a file, it rejects my request, saying that it can't find
my old default location. When I use the Help function in Excel,
it misleads by telling me to go: File, Options, General, Info
Path Options, more options. However, there is NO Info Path
Options choice available in either Excel or Word. When I go:
File, Options, Save I am presented with a chance to set the
Default Local file location. I change that and click Okay, but
the next time I try to get that file, it says that it can't find
it, referring to the old file location. The error message doesn't
tell me how to change the default location of moved files.

When I try to open a file that I've changed the default location
on, it rejects me. I can Browse to that file at
C:\Users\Kirk\Documents and open it, and I can look at the File,
Options, Save, default local file location, and it says that is
C:\Users\Kirk\Documents. But that new location doesn't "take."

What am I doing wrong? Is there a way to change the file
location so that I can open my files without having to browse to
them each time?

Thanks in advance for any help.


Excel stores the full path to the files on its Recent list; - since you've
moved those file to a different path, Excel can't find them in the 'stored'
path.

You need to Browse the 1st time you open any of those files so Excel stores the
new path for each one!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Old January 15th 19, 09:14 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2011
Posts: 8
Default Help needed in hanging the default file location for Excel and Word

On Tue, 15 Jan 2019 14:25:56 -0500, GS wrote:



Excel stores the full path to the files on its Recent list; - since you've
moved those file to a different path, Excel can't find them in the 'stored'
path.

You need to Browse the 1st time you open any of those files so Excel stores the
new path for each one!


Thanks, Garry, I was afraid of that.
  #4   Report Post  
Old January 15th 19, 11:14 PM posted to microsoft.public.excel.misc
dpb dpb is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2018
Posts: 67
Default Help needed in hanging the default file location for Excel andWord

On 1/15/2019 3:14 PM, Kirk Bubul wrote:
On Tue, 15 Jan 2019 14:25:56 -0500, GS wrote:



Excel stores the full path to the files on its Recent list; - since you've
moved those file to a different path, Excel can't find them in the 'stored'
path.

You need to Browse the 1st time you open any of those files so Excel stores the
new path for each one!


Thanks, Garry, I was afraid of that.


I really "know nuthink!" of any of the Office products other than the
bare basics, but can't you clear the Recent Files list and then won't it
use default locations when open the File menu?

--



  #5   Report Post  
Old January 16th 19, 09:14 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 982
Default Help needed in hanging the default file location for Excel and Word

On 1/15/2019 3:14 PM, Kirk Bubul wrote:
On Tue, 15 Jan 2019 14:25:56 -0500, GS wrote:



Excel stores the full path to the files on its Recent list; - since you've
moved those file to a different path, Excel can't find them in the
'stored'
path.

You need to Browse the 1st time you open any of those files so Excel
stores the
new path for each one!


Thanks, Garry, I was afraid of that.


I really "know nuthink!" of any of the Office products other than the bare
basics, but can't you clear the Recent Files list and then won't it use
default locations when open the File menu?


That would be the same as browsing to the new location of the files via the
'Open' menuitem. Kirk suggests he already did change the default path, but is
clicking a file (shortcut link) to open on the Recent list.

Clearing that list is probably a good idea because it will remove the natural
tendancy to select previously worked on files while rebuilding the list with
the new path where those files were moved. However, I don't see a feature in
the UI to clear the Recent list so will have to be done manually!

The path to the list is:
C:\Users\<username\AppData\Roaming\Microsoft\Offi ce\Recent

Optionally, the files in this folder could be modified to change their 'Target'
via the Properties dialog, Shortcut tab -OR- via code. The latter would require
looping all the files in the folder and setting/modifying their target property
via VB[A]'s Replace() function.

IE:
Const sOldPath$ = "C:\office documents"
Const sNewPath$ = "C:\Users\Kirk\Documents"

Dim sTarget$
'code to loop the folder 1 file at a time

'code to get current Target property
sTarget = Replace(sTarget, sOldPath, sNewPath)
'code to set new Target Property

'code to get the next file

Note that no error is raised if sOldPath isn't found, so only those with the
old path will be updated.

Unfortunately, Application.RecentFiles.Item(#).Path is READ ONLY and so some
other approach is required to edit paths. Perhaps the new DsoFile.dll is one
way to go.

You can use VBA, however, to read the existing path, modify it as above, then
..Add a new Item so each file gets replaced with its new path instead of having
to browse for every one manually...

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

--
Garry

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


  #6   Report Post  
Old January 16th 19, 11:44 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 982
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
  #7   Report Post  
Old January 16th 19, 12:14 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 982
Default Help needed in hanging the default file location for Excel and Word

This is a better approach...

Sub ResetRecentPaths()
Const sOldPath$ = "C:\office documents" '//edit to suit
Const sNewPath$ = "C:\Users\Kirk\Documents" '//edit to suit

Dim n&, lCount&, saFiles$()

'Store current paths in array
lCount = Application.RecentFiles.Count
ReDim saFiles(1 To lCount)
With Application.RecentFiles
For n = LBound(saFiles) To UBound(saFiles)
saFiles(n) = Replace(.Item(n).Path, sOldPath, sNewPath)
Next 'n

'Clear existing RecentFiles list
For n = UBound(saFiles) To LBound(saFiles) Step -1
.Item(n).Delete
Next 'n

'Add the modified paths to RecentFiles
.Maximum = lCount
For n = UBound(saFiles) To LBound(saFiles) Step -1
.Add saFiles(n)
Next 'n
End With 'Application.RecentFiles
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #8   Report Post  
Old January 16th 19, 01:09 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 982
Default Help needed in hanging the default file location for Excel and Word

Change 1 line as follows...

This is a better approach...

Sub ResetRecentPaths()
Const sOldPath$ = "C:\office documents" '//edit to suit
Const sNewPath$ = "C:\Users\Kirk\Documents" '//edit to suit

Dim n&, lCount&, saFiles$()

'Store current paths in array


lCount = Application.RecentFiles.Maximum

ReDim saFiles(1 To lCount)
With Application.RecentFiles
For n = LBound(saFiles) To UBound(saFiles)
saFiles(n) = Replace(.Item(n).Path, sOldPath, sNewPath)
Next 'n

'Clear existing RecentFiles list
For n = UBound(saFiles) To LBound(saFiles) Step -1
.Item(n).Delete
Next 'n

'Add the modified paths to RecentFiles
.Maximum = lCount
For n = UBound(saFiles) To LBound(saFiles) Step -1
.Add saFiles(n)
Next 'n
End With 'Application.RecentFiles
End Sub


--
Garry

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel will not open in default file location Roger Chapman Excel Discussion (Misc queries) 2 December 8th 10 04:58 PM
Default File Location-Excel 2003 MBF Excel Discussion (Misc queries) 3 February 27th 09 06:00 PM
Excel 2003 default file location GeoffA Excel Discussion (Misc queries) 2 October 15th 07 05:13 PM
Excel 2003: cannot find default file location Spokaneman Excel Discussion (Misc queries) 1 March 10th 06 06:58 PM
Add a default location for print to file in Excel. valders Excel Discussion (Misc queries) 0 December 30th 04 11:19 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017