Thanks.
ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) = "test"
changes the Title of the active document to test.
For a list of the properties, check out the DocumentPropertyObject in the
VBA on-line help. You refer to each of the properties listed there by
prefacing it with wdProperty as indicated in the above example.
Hope this helps.
Regards,
Doug Robbins - Word MVP
To assist in maintaining the thread for the benefit of others, please post
any response to the NewsGroup.
Pedro Bastos Correia <pedr...@euronut.com> wrote in message
news:7agpcj$k...@news3.euro.net...
ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) = MyNewTitle$
This should do it. Do a search in Word VBA help on "wdProperty" to get the
constants to use for other properties.
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email
Pedro Bastos Correia wrote in message <7agpcj$k...@news3.euro.net>...
When doing this for an new (not yet saved) document, i would expect
that this new title becomes the default filename.
Manually setting this title in the file-properties-dialog does change
the default filename.
How can i do this through code ???
With Dialogs(wdDialogFileSummaryInfo)
.Title = "hello"
.Execute
End With
--
Will Rickards
Software Engineer
wric...@op.net
http://www.op.net/~wrickard
Please post ALL replies/requests to the newsgroup for the benefit of the newsgroup.
marcel van zoggel wrote in message <36dce2e9....@msnews.microsoft.com>...
Sub title_of_my_file()
ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) = "test_my_name"
' COMMENT: if you do not set the path, the file is saved to the default path
my_path = "c:\"
my_name = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle).Value &
".doc"
ActiveDocument.SaveAs (my_path & my_name)
End Sub
If it is OK for what you need, adapt it to your macros !
Enjoy yourself
Bye