Extracting and displaying file custom properties

Posted on 2004-10-24
Last Modified: 2010-05-18
I have an urgent question. How can I extract and display file custom properties (that is, microsoft documents) in VB.NET?

Your help will be very much appreciated
Question by:uncivilizedpikinini
    LVL 10

    Accepted Solution

    Hi uncivilizedpikinini,
    I have not done a lot with OLE and VB.NET but let me know if this gives you any ideas.

    LVL 1

    Assisted Solution


    This is for OfficeXP(you should have reference to those dlls: office.dll, Microsoft.Office.Interop.Word.dll)

    'Test if the Word isn't already started
    If IsNothing(appWord) Then
        appWord = New word10.ApplicationClass
        appWord.Visible = True

    End If

    Dim doc As word10.Document

    doc = appWord.Documents.Open(sPath, ReadOnly:=False)

    Dim objCustomProp As Object = doc.CustomDocumentProperties 'this line returns the custom properties

    LVL 34

    Expert Comment

    dont need the refrence's, you can still late bind in vb.Net

    Dim appWord as new object
    appWord = Microsoft.VisualBasic.CreateObject("word.application")

    LVL 18

    Assisted Solution

    LVL 18

    Expert Comment

    NetworkArchitek , hagipmc , Armoghan

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now