View Single Post
  #3   Report Post  
Dian D. Chapman, MVP
 
Posts: n/a
Default

You can't record this type of code and what you want to do is a bit
more complex than you think. You need to learn some VBA and write a
procedure to do what you want.

This isn't the most efficient way, since you should be using File
System Object to set the folder path to the registry...but with little
knowledge, you can use this code to do what you want.

Plus, in order to overwrite the original SaveAs command, you need to
call the macro FileSaveAs and not just Save.

Add this code to your module and it'll do the job...more or less.
However, change the "myFolder" to the correct path that you need set.
But know that if the user doesn't have this path or if it is a network
path that is different on their system, you'll get an error...

Sub FileSaveAs()

Dim strFileName As String
Dim strPath As String

strPath = "c:\myFolder"

strFileName = InputBox("Enter the Save As name for this file")

Application.ChangeFileOpenDirectory strPath

ActiveDocument.SaveAs strFileName

End Sub

Note...to understand how to use the above code, read this TechTrax
article:

Sharing Macros
http://pubs.logicalexpressions.com/P...cle.asp?ID=166

Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine

Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html



On Fri, 22 Apr 2005 11:49:29 -0700, "Aurora"
wrote:

I am using Word 2000
I want to create a macro to save a document in a
particular file. I created a macro called (SAVE) and when
thru the steps that I normally would to save a file
beginning with "save file as". I clicked on the pause
icon while recording to allow the user to enter a file
name and then hit the resume icon, "save" and then stopped
the macro. It worked as I was creating the macro. But
when I run the macro it does not work. It doesn't give me
any errors.

Does anyone have any ideas????

Aurora