I wanted to write a vb program to access the Ms Word Properties. eg. Title, Subject, Comments (in the File -> Properties). Do anyone have any example??? Please help!!!
I would think its under the CustomDocumentProperties or the BuiltInDocumentProperties. Im not sure, but I would add word as a reference then start searching.
ex.
dim oDoc as word.document
oDoc.BuiltInDocumentProperties Scott
Programmer Analyst
Using Word Objects you can get the date and time the document was created and the date and time it was last saved.
Dim oDoc As Document
Dim oProp As DocumentProperty
On Error Resume Next
Set oDoc = ActiveDocument
Debug.Print "Creation date", oDoc.BuiltInDocumentProperties("Creation date"
Debug.Print "Last save time", oDoc.BuiltInDocumentProperties("Last save time"
For Each oProp In oDoc.BuiltInDocumentProperties
Debug.Print oProp.Name, ;
Debug.Print oProp.Value, ;
Debug.Print oProp.Type
Next oProp
Set oDoc = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.