Jump to content

Microsoft office core documentproperties � how to enumerate


Schuss
 Share

Recommended Posts

Can anyone help me use the DocumentProperties Interface (in office.dll) - DocumentProperties Interface (Microsoft.Office.Core)?

I need to read properties from various Office 2002 and later documents. Ive done this successfully via Excel and Word automation, but I havent been able to get it to work it via Office automation.

Microsoft offers a managed code example (my expurgated version):

Dim propertyName as string =Version, theVersion as string
    Dim properties As Office.DocumentProperties
    properties = CType(Me.CustomDocumentProperties, Office.DocumentProperties)

    Dim prop As Office.DocumentProperty

    For Each prop In properties
        If prop.Name = propertyName Then
    theVersion = prop.Value.ToString()
        End If
    Next

This approach provides access to document properties in all types of Office documents except for those in MSAccess documents.

Any assistance would be very much appreciated

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...