Document properties to access database

A

andy

Can anyone tell me how to save document properties to an access database.
Here is what I want to be able to do
1) Create a new document from a template and save details such as number of
pages, title, creation time, created by etc
2) Log any modifications to the document
3) Log who opens the document, accessed time etc

Thanks in advance

Andy
 
P

Perry

You would still have to think about a mechanism how to identify
each specific instance in which a document gets opened.
Leaving this discussion aside, here is the information regarding document
properties:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/html
/deovrworkingwithdocumentproperties.asp

Now, assuming that you have a recordset object instantiated and opened,
here's some sample code to transfer docprop values to recordset fields:
For the ease of below example, every builtin document property has
an equivalent recordset field:
(rs = recordset object)

For Each fld in rs.Fields
fld.Value = ActiveDocument.BuiltInDocumentProperties(fld.Name).Value
Next

Krgrds,
Perry
 
Top