Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word should catalog misspelled words to study. | Microsoft Word Help | |||
Converting WordPerfect 12 files to Word 2003 | New Users | |||
How to put graphics on envelopes? | Microsoft Word Help | |||
Why can't I get Multiple instances of word? | Microsoft Word Help | |||
I am having difficulty with deleting headers and footers | New Users |