Board index » delphi » Word 8 Document Properties using OLE

Word 8 Document Properties using OLE

Using Word 8.0 (Office 97)
Does any know how to get access to the Document properties using
OLE from Delphi 3.02.
have tried to use Get_BuiltInDocumentProperties but got lost somewhere !

Any Good brains out there ?

 

Re:Word 8 Document Properties using OLE


To access the Properties you have to use this method
Word_application.ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)
:= title;

where Word_Application is you ole connection to Ms Word, and
wdPropertyTitle is a number constant found by looking in the object viewer
in the VBA editor.  you will have to either declare this variable or put the
number in for WdPropertyTitle or whatever property you want to set.  I used
this method and it works great.

Quote
Codger wrote in message ...
>Using Word 8.0 (Office 97)
>Does any know how to get access to the Document properties using
>OLE from Delphi 3.02.
>have tried to use Get_BuiltInDocumentProperties but got lost somewhere !

>Any Good brains out there ?

Other Threads