Document Title

K

Kolmyk AE

Hi

Could you help me to solve the next problem
My program loads document from DB to temporary file, and makes new document by this temporary template document. All works correctly, but I want
1. Can I change default document title "Document1 - Microsoft Word" to "SomeCustomName - Microsoft Word"
2. Can I change default file name (when user saves this document) "Doc1.doc" to "SomeCustomName.doc"

Best Regards
Kolmyk AE
 
J

Jezebel

The only way to change the displayed document title is to save the document.
You can set the default filename to anything you like by manipulating the
FileSave dialog. Check help on Word's Dialogs() collection.




Kolmyk AE said:
Hi,

Could you help me to solve the next problem?
My program loads document from DB to temporary file, and makes new
document by this temporary template document. All works correctly, but I
want:
1. Can I change default document title "Document1 - Microsoft Word" to
"SomeCustomName - Microsoft Word"?
2. Can I change default file name (when user saves this document)
"Doc1.doc" to "SomeCustomName.doc"?
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < Kolmyk AE > écrivait :
In this message, < Kolmyk AE > wrote:

|| Hi,
||
|| Could you help me to solve the next problem?
|| My program loads document from DB to temporary file, and makes new
document by this temporary
|| template document. All works correctly, but I want:
|| 1. Can I change default document title "Document1 - Microsoft Word" to
"SomeCustomName -
|| Microsoft Word"?

Play around with the following code:

Application.Caption = "Application Window"
ActiveDocument.ActiveWindow.Caption = "Active Document Window"

Examples:
ActiveDocument.ActiveWindow.Caption = "Database document"
will display
"Database document - Microsoft Word"

Application.Caption = "Central Project"
ActiveDocument.ActiveWindow.Caption = "Database document"
will display
"Database document - Central Project"

Just remember that if you change the Application caption, that change will
stick for the rest of the Word session.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < Kolmyk AE > écrivait :
In this message, < Kolmyk AE > wrote:

|| Hello,
||
|| Thank you! It's really that what I want!

You're welcome!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top