Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Wombler Wombler is offline
external usenet poster
 
Posts: 1
Default how do I generate filename from text in Word document

I want to automatically generate the filename to save as from data at the top
of a document.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default how do I generate filename from text in Word document

Is the "data at the top of a document" in a form field, a bookmark, a
table cell, or something else that's clearly identifiable? Or is it
just some plain text?

Once you know where to look, you can create macros in the template on
which these documents are based. Catching all the possible ways for an
unsaved document to be saved (and thus named) is a bit difficult. See
http://www.word.mvps.org/FAQs/Macros...tSavePrint.htm.

In each macro, you get the data from the document, modify it if
necessary, and put it into the document's Title property -- see
http://www.word.mvps.org/FAQs/Macros...efFilename.htm. Finally,
you call

Dialogs(wdDialogFileSaveAs).Show

to display the SaveAs dialog, which will have your automatically
generated file name in the File Name box.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 7 Jan 2007 10:16:01 -0800, Wombler
wrote:

I want to automatically generate the filename to save as from data at the top
of a document.

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
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
Why can't I get Multiple instances of word? Laverne Microsoft Word Help 14 November 17th 06 01:35 PM
I am having difficulty with deleting headers and footers LHD New Users 5 July 24th 06 01:44 AM


All times are GMT +1. The time now is 09:28 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"