none
DSOFramer and WordprocessingML RRS feed

  • Question

  • Hello,

    I'm using the DSOFramer to open Word2007 in a WinForm, I want to know if it's possible to recover the Open file in a WordProcessingDocument format.
    I try to create the wordProcessingDocument by myself but the open method fail because the docx is already open in the DSOFramer.

    Thanks for your help

    Friday, May 21, 2010 8:40 AM

Answers

  • I found what I was looking for thanks to Manvir.

    Document. WordOpenXML Property

    Gets an XML string that contains the contents of the document in the Word Open XML format.

    Namespace:  Microsoft.Office.Tools.Word
    Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
    • Marked as answer by AmineBO Wednesday, May 26, 2010 9:40 AM
    Wednesday, May 26, 2010 9:39 AM

All replies

  • I also want to know if it's possible to detect event like enter or exit into a content control inside a Word document open in the DSOFramer.

    Thanks for your help
    Friday, May 21, 2010 9:01 AM
  • I am not sure what you meant by recovering the currently open file, however, you can most certainly get the current document's OpenXML using Document.WordOpenXML property.

    The value of this property is a string containing a flat XML with each node corresponding to different parts of the OpenXML package. You can then programmatically traverse each node, save them as separate xml files in a folder, and package them into a new DOCX file.

    Hope this helps!

    Regards,

    Manvir Singh
    http://www.manvirsingh.net/

    • Marked as answer by AmineBO Tuesday, May 25, 2010 12:09 PM
    • Unmarked as answer by AmineBO Wednesday, May 26, 2010 8:29 AM
    Friday, May 21, 2010 2:23 PM
  • Thank you Manvir Singh! that's what I meant by "recovering the currently open file" but I don't find the Document. The file is already open in the DSOFramer and if I want to reopen it with the Open Xml Sdk 2.0 to have an access to the document I have an error because the file is already open.
    Wednesday, May 26, 2010 8:33 AM
  • I found what I was looking for thanks to Manvir.

    Document. WordOpenXML Property

    Gets an XML string that contains the contents of the document in the Word Open XML format.

    Namespace:  Microsoft.Office.Tools.Word
    Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
    • Marked as answer by AmineBO Wednesday, May 26, 2010 9:40 AM
    Wednesday, May 26, 2010 9:39 AM