Changing the properties of a word document
I want to change the property title in a word document I am generating via VBA and I have been looking out on the web for some examples.
I found the following code but it doesn't seem to work.
.ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) = ""
Is this the correct method? If not could you point me in the right direction?
Thanks,
DL
Edit: I'm using office 2003
Re: Changing the properties of a word document
are you calling this code from within the word document or from an external app?
can you post your code and what the error is?
Re: Changing the properties of a word document
The whole document of code is too big to post here, I just need to know the correct method to change the properties of of a word document using vba.
Using the code above calling it from an external app, the error I get is "invalid procedure call or arguement"
Thanks for the help. I am not using vb.net
1 Attachment(s)
Re: Changing the properties of a word document
Your talking about this property?
VB Code:
Documents(1).BuiltInDocumentProperties(wdPropertyTitle).Value = "Test"
'wdPropertyTitle = 1