Question :
I need to read an RTF File that contains an OLE Object as innerdocument.
RTF File = [ Ole object (word document) is embedded into it.]
Sample RTF File that contains word as OLE Embedded into it.
Reference I have done :
Here they have done a program to extract the image embedded as OLE in RTF.
I had extracted the program which is marked as correct answer , but its does not work for me.
Using OpenXML SDK. (it cannot be able to open RTF Files.)
some other SDK like GemBox etc.. Which cannot be able to open innerdocument ie. ole in RTF)
Work I have done :
I had done using microsoft.office.interop.word.dll which gives an accurate answer , but it will not work on server.
For eg: it opens an RTF File using MS WORD and which is installed in client machine where there is no WORD APPLICATION Installed in server.
so , this is not suitable for me.
I need to open and read the RTF OLE Content and i need to store in a string(say for eg). bcoz with string i can do lot of things.
Can anyone has an idea to solve my issue.?
package
object (like in my previous answer), but aWord.Document.12
object (.RTF is a text format underneath). Just remove the test for "package" in the sample code so you'll get data from GetNextTextAsByteArray as a byte[]. From this data, in the Open Xml (.zip format) case, just look for the first 'PK' string (or 0x50 0x4B in byte hex) and this will be the start of the .docx or other document. – Lianaliane