Create a Custom Document Property

Adds a custom property (TestProperty, with a value of "Test") to the summary information properties for a document named C:\Scripts\Test.doc.

VBScript Code


Set objPropertyReader = CreateObject("DSOleFile.PropertyReader")
Set objDocument = objPropertyReader.GetDocumentProperties _
    ("C:\Scripts\Test.doc")

Set colCustomProperties = objDocument.CustomProperties
errReturn = ColCustomProperties.Add("TestProperty", "Test")