Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Setting filename for "Save as"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bo Rasmussen - 07 Dec 2004 10:59 GMT
Hi,

When a document is created from a template, some userform shows up. When the
user is done filling in the form, the filename for the document can be
deduced. How Do i tell word the filename to use when the user chooses save
as?

Regards
Bo Rasmussen
Jezebel - 07 Dec 2004 12:23 GMT
Simplest is just to save the document at that point:

ActiveDocument.SaveAs FileName:=....

> Hi,
>
[quoted text clipped - 5 lines]
> Regards
> Bo Rasmussen
Jay Freedman - 07 Dec 2004 16:07 GMT
That's good if you can also deduce (or want to force) the folder to save the
document in. But if you want to "suggest" the proper name and path but still
let the user change it in the Save As dialog, you can do something like this
(see http://word.mvps.org/FAQs/MacrosVBA/ChangeSaveAsPath.htm):

With Dialogs(wdDialogFileSaveAs)
   .Name = "C:\My Documents\" & DeducedFilename
   .Show
End With

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> Simplest is just to save the document at that point:
>
[quoted text clipped - 9 lines]
>> Regards
>> Bo Rasmussen
Bo Rasmussen - 08 Dec 2004 08:44 GMT
Thanks,

Finally I implemented a FileSaveAs in a global template. The title is
identical to the deduced filename

Sub FileSaveAs()
With Dialogs(wdDialogFileSaveAs)
   .Name = ActiveDocument.BuiltInDocumentProperties("Title")
   .Show
End With

End Sub

This seems to work alright :o)

Regards
Bo Rasmussen

> That's good if you can also deduce (or want to force) the folder to save the
> document in. But if you want to "suggest" the proper name and path but still
[quoted text clipped - 19 lines]
> >> Regards
> >> Bo Rasmussen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.