Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
JustinBailey JustinBailey is offline
external usenet poster
 
Posts: 4
Default SaveAs & ChangeFileOpenDirectory

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?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
garfield-n-odie [MVP] garfield-n-odie [MVP] is offline
external usenet poster
 
Posts: 2,587
Default SaveAs & ChangeFileOpenDirectory

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?


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
JustinBailey JustinBailey is offline
external usenet poster
 
Posts: 4
Default SaveAs & ChangeFileOpenDirectory

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 .

  #4   Report Post  
Akaisar Akaisar is offline
Junior Member
 
Posts: 0
Default

ChangeFileOpenDirectory "C:\two"
With Application.Dialogs(wdDialogFileSaveAs)
.Name = "NameOfYourDoc.doc"
.Show
.Execute
End With



You have to have execute or it won't work. This is what I use to open a SaveAs dialog in word and it works great.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SAVEAS / OPEN very slow Adrian Microsoft Word Help 3 August 1st 06 10:09 PM
macro saveas jakekene Microsoft Word Help 0 August 18th 05 04:38 PM
SaveAs - Curious Behavior PT New Users 1 August 7th 05 07:39 PM
word saveas dialogue box error WilliamDykman New Users 1 June 15th 05 09:04 AM
Programming Open and SaveAs AMercer Microsoft Word Help 1 March 17th 05 12:11 PM


All times are GMT +1. The time now is 01:00 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"