Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
 
Posts: n/a
Default How to assign filename automatically from document content?

There are two ways Word comes up with an automatic filename:

1. From the Title field in the File Properties.

2. From the first few words in the document (up to the first punctuation
mark) if the Title field is blank.

If you enable "Prompt for document properties" on the Save tab of Tools |
Options, the Properties dialog will be presented when you save, and you can
fill in the Title field; unfortunately, this happens only *after* you have
selected a filename, so it's no help.

So the only approach that will work is to write text to the Title field
before saving the document. You could write a macro to collect the filename
and write it to the Title property, but instead of using a MacroButton
(which would require that the user double-click it), I would suggest a
UserForm loaded by an AutoNew macro. The UserForm need have only one field;
the data entered in that field will become the Title field. If you need help
with the required VBA, please post in one of the word.vba NGs.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Lito Kusnadi" wrote in message
...
Hi,

I have another problem with Word. I tried to make a document with a

subject
line where the end user will type in the text in it.
I then want to take this subject string as the filename. So when the user
save the file, it would automatically assign the string as the name. Could
this be done easily with {MacroButton}?

--
Lito Kusnadi
Technical Consultant
React Solutions AU


 
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
Footer filename change everytime you save new document from Templ garfield-n-odie Page Layout 0 November 10th 05 12:28 AM
Save 'Automatically update document styles' option to template sooz Microsoft Word Help 1 October 25th 05 11:32 AM
assign ALT+F4 to a command button in a work document Bernd Microsoft Word Help 1 October 21st 05 04:45 AM
When copying HTML text document to Word, how do you automatically. campsoup1988 Microsoft Word Help 0 July 18th 05 11:56 PM
Automatically Saving while typing a Document KM1 Microsoft Word Help 3 February 5th 05 06:25 AM


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

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"