sbsbats
asked on
Display document properties
I am trying to display a property (Category property) of a word document in a message box using this code -
MsgBox (ActiveDocument.BuiltInDoc umentPrope rties(Cate gory).Valu e)
Geting an invalid call procedure error
Any suggestions?
MsgBox (ActiveDocument.BuiltInDoc
Geting an invalid call procedure error
Any suggestions?
ASKER
VB 6.5
Shouldn't ActiveDocument.BuiltInDocu mentProper ties(Categ ory).Value - return the property value?
The code above dosn't help me - I am writing the properties to the document already through a form and was just wondering why this syntax is incorrect
Shouldn't ActiveDocument.BuiltInDocu
The code above dosn't help me - I am writing the properties to the document already through a form and was just wondering why this syntax is incorrect
Do you mean that your using VB 6.0?
I forgot to ask you what version of MS Word you are using and what the error message is.
I forgot to ask you what version of MS Word you are using and what the error message is.
ASKER
HI,
Nope its 6.5 (Help - about)
Office 2003
error message = Invalid call procedure
Nope its 6.5 (Help - about)
Office 2003
error message = Invalid call procedure
That is VB 6.0 with service pack 5 installed.
ASKER
Thats great we now agree on the version
Unfortunately I don't have VB 6.0 on my dev box anymore, so I can't garauantee that this will work.
Try this wdPropertyCategory where you have category in your code above.
Try this wdPropertyCategory where you have category in your code above.
ASKER
Cheers for that mate but still no go - get the same error message - invalid call to a procedure ...."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
should it be
MsgBox (ActiveDocument.BuiltInDoc umentPrope rties("Cat egory").Va lue)
MsgBox (ActiveDocument.BuiltInDoc
lol, I didn't realize he didn't have quotes in is code. I should have been paying closer attention, doh. Sorry.
ASKER
sorry guys the above is a typo - I do have the quotes but still no go
ASKER
HI,
Thanks for all the help - I was using the custom properties (CustomDocumentProperties) procedure for existing properties and the above (built in properties) to access custom properties - silly
Thanks for all the help - I was using the custom properties (CustomDocumentProperties)
This might help:
http://www.vb-helper.com/h