none
Extract data from word to database based on style RRS feed

  • Question

  • I need to extract data from microsoft word documents into database , based on style meaning that every time a style called AIO and a style called BIO are found , its contents must be extracted to the database , any help with that ?
    Wednesday, January 5, 2011 9:25 AM

Answers

  • For what, more specifically?

    I'm a specialist in the object model, I know about the methods and the properties. I don't have any in-depth experience with doing what I propose. That's why I asked if you're familiar workign with XML.

    The Word XML vocabulary can be found if you search MSDN for WordProcessingML. It will be under the Word 2003 documentation.

    More information about working with it can be found at OpenXMLDeveloper.org


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Thursday, January 13, 2011 11:05 AM
    Thursday, January 6, 2011 6:21 PM
    Moderator

All replies

  • Version of Word? File format (doc, docx, etc)? Programming language?
    Cindy Meister, VSTO/Word MVP
    Wednesday, January 5, 2011 1:20 PM
    Moderator
  • Word 2003

     

    File Format : doc

     

    programming language : vb.net or C#

     

    help please

    Wednesday, January 5, 2011 1:56 PM
  • Hi Georges

    Thank you for the additional details :-)

    Are you familiar with working with XML? Most efficient would probably be to use the .NET tools in the XML namespace to "parse" the WordProcessingML of the file, without having to deal with the "interop".

    If the file were saved in the "Word XML" file format you could work on the closed file. But if the file is saved as a *.doc then you would have to open it in Word. Then you can use the doc.XML property to bring the entire document content as XML into a string. In essence, you could use the DOM or XSLT to pick up just the content formatted with the styles in question and write it to the database.


    Cindy Meister, VSTO/Word MVP
    Wednesday, January 5, 2011 4:03 PM
    Moderator
  • Any hint , or source code or example please ?
    Thursday, January 6, 2011 8:10 AM
  • For what, more specifically?

    I'm a specialist in the object model, I know about the methods and the properties. I don't have any in-depth experience with doing what I propose. That's why I asked if you're familiar workign with XML.

    The Word XML vocabulary can be found if you search MSDN for WordProcessingML. It will be under the Word 2003 documentation.

    More information about working with it can be found at OpenXMLDeveloper.org


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Thursday, January 13, 2011 11:05 AM
    Thursday, January 6, 2011 6:21 PM
    Moderator