PC Review


Reply
Thread Tools Rate Thread

SaveAs & ChangeFileOpenDirectory

 
 
=?Utf-8?B?SnVzdGluQmFpbGV5?=
Guest
Posts: n/a
 
      20th Jul 2006
I have a document named test.doc saved in C:\one. I open that document in
Word (2003). Now I want a macro that shows the SaveAs dialog defaulting to
C:\two instead of C:\one. I've tried...

ChangeFileOpenDirectory "C:\two\"
Dialogs(wdDialogFileSaveAs).Show

....and...

Dialogs(wdDialogFileSaveAs).Name = "C:\two\"
Dialogs(wdDialogFileSaveAs).Show

....but those only seem to work on unsaved documents and not at all,
respectively. And not that it makes a noticeable difference either way but
Tools > Options > File Locations > Documents is already set to C:\two. Any
suggestions?
 
Reply With Quote
 
 
 
 
garfield-n-odie [MVP]
Guest
Posts: n/a
 
      20th Jul 2006
See http://www.gmayor.com/automatically_backup.htm .

JustinBailey wrote:

> I have a document named test.doc saved in C:\one. I open that document in
> Word (2003). Now I want a macro that shows the SaveAs dialog defaulting to
> C:\two instead of C:\one. I've tried...
>
> ChangeFileOpenDirectory "C:\two\"
> Dialogs(wdDialogFileSaveAs).Show
>
> ...and...
>
> Dialogs(wdDialogFileSaveAs).Name = "C:\two\"
> Dialogs(wdDialogFileSaveAs).Show
>
> ...but those only seem to work on unsaved documents and not at all,
> respectively. And not that it makes a noticeable difference either way but
> Tools > Options > File Locations > Documents is already set to C:\two. Any
> suggestions?


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SnVzdGluQmFpbGV5?=
Guest
Posts: n/a
 
      20th Jul 2006
I see how that works, and you're on the right track, but the situation that
page describes programatically saves the document with the same name in a
different but fixed folder. What I'm looking to do is open the SaveAs window
defaulting to C:\two so that the user can browse to another folder and/or
rename the file if they want. I understand I *could* use the gmayor
technique, change the filename and path values to variables, and prompt the
user but that seems far more cumbersome to the user than it's worth.

Anyone else?


"garfield-n-odie [MVP]" wrote:

> See http://www.gmayor.com/automatically_backup.htm .

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs in Outlook - Detect type before the SaveAs Michael Microsoft Access VBA Modules 1 9th Jun 2009 04:03 PM
saveas ActiveWorkbook.SaveAs Filename:=Range("A1").Value DarrenL Microsoft Excel Programming 4 18th Apr 2009 07:54 AM
Microsoft IE Custom 404 Error Message and execCommand SaveAs Lets Remote Users Bypass XP SP2 Download Warning Mechanisms JM Tella Llop [MVP Windows] Windows XP General 0 21st Nov 2004 07:09 PM
Lost SaveAs .mht option Sydney Lotterby Windows XP General 2 19th Nov 2004 08:31 AM
Strange Problem; Plenty of free space but File->SaveAs says not enough disk space Al Dykes Windows XP General 0 13th Sep 2004 02:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:10 AM.