Jump to content
Sign in to follow this  
Schuss

Microsoft office core documentproperties � how to enumerate

Recommended Posts

Schuss

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.