Results 1 to 2 of 2
2002-04-16, 06:13 #1
- Join Date
- Apr 2002
- Thanked 0 Times in 0 Posts
Name a file automatically using bookmark contents? (Word 97)
There must be a way to do this, and I'm sure it's not too hard. It would be SO USEFUL!
I use templates extensively with ASK and REF fields to fill repetitive spots in the reports.
How can I get the AUTONEW macro which gets all this info to save the file immediately with a filename using the info in the bookmarks?
e.g. "Smith John 4372 041602.doc" Where 4372 is ID and 041602 is CREATEDATE.
I've been wanting to do this forever, and I'm sure legions of Loungers would love it, too.
2002-04-16, 06:38 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 93 Times in 89 Posts
Re: Name a file automatically using bookmark contents? (Word 97)
This seems to break down into two parts:
(1) building a string from bookmark information to be used as the file name; and
(2) calling the ActiveDocument.SaveAs method if the string looks okay (e.g., it's not blank).
Other things to think about: duplicate file names, what if someone entered the wrong information in the fields, what if someone entered an illegal character (such as a ).
Do you want to take a stab at one or more of these items?