none
Document.WordOpenXML Property throws System.OutOfMemoryException RRS feed

  • Question

  • Hi,

    We have a developed an word add-in (C#) which fetches the complete WordOpenXML from the document.

    This API fails on 32bit Word and throws System.OutOfMemoryException.

    The document is only one page

    I have attached a link for the document
    https://drive.google.com/file/d/1crfPiy3vKJa0V2Z0BQnZH4WdOSkPf6l1/view?usp=sharing

    Exception of type 'System.OutOfMemoryException' was thrown.
    
    mscorlib
    
    
       at System.String.CtorCharPtrStartLength(Char* ptr, Int32 startIndex, Int32 length)
       at System.StubHelpers.BSTRMarshaler.ConvertToManaged(IntPtr bstr)
       at Microsoft.Office.Interop.Word.DocumentClass.get_WordOpenXML()

    Sadly there is no option to upgrade to 64 bit system.
    Does anyone know a workaround or a solution to get WordOpenXML by any other way?

    Thanks
    Abhijeet

     
    Thursday, February 21, 2019 8:43 AM