RTF Ole object extraction and editing - ms-word

I have an RTF file that has OLE object embedded into it.Can anybody tell me how to programmatically extract the OLe object,modify it and then embed it back to RTF.I have come across tools that can extract OLE from RTF but how to replace the modified OLE back to the RTF.I am new to in this domain so please help me

Related

Converting VSTO to Web Add-In

Is there any way I could insert another document?
In VSTO-there is an option to insert document with InsertFile.Looking for something similar here.
The Office JS APIs do not provide an option for inserting a file.
What would be possible is to get the Word Open XML of a file, convert it to the OPC flat file format, then insert that using one of the ooxml methods available.

How to load a Word add-in with a specific file read from file system with Office.js

I'm a newbie in Office365 add-in development, and I'm trying create a poc for a office 365 word add-in and I need to load the add-in with a docx file read from filesystem (alternately from one-drive). Using
Word.run(function (context) {
var body = context.document.body;
...
the document is the current blank word document. Is it possible to start the add-in with a file read from file system? or one the add-in is loaded, can I open a docx file and work on it. I Search in the documentation, but I didn't find anything useful.
Thanks
the method that you want to use in this case is the insertFileFromBase64 method. This method takes as first parameter a base64 encoded docx that then you can insert it.
Check out the reference here
https://dev.office.com/reference/add-ins/word/body?product=word?product=word
note that you need to provide an experience of the user picking a file from the system (using regular HTML file controls) and then base-64 encode it.
Hope this sets you up in the right direction.

Insert Objects into Word 2010 with metadata

Please excuse my ignorance on this subject I am very new to this.
I need to be able to insert images and html that contains tabular data into a word document from a Word Addin. This I have managed to do in its most basic form using the InsertFile method. Word converts the html into its native syntax wordprocessingML which is fine.
However, I need to be able to store some metadata with each inserted object so that it can be regenerated externally and replaced in the document when requested by the user. I have been looking at Open XML but can see how or if it is possible with this either.
Please can you point me in the right direction as to how best I can achieve this.
Thanks in advance.

How to read excel file using xmldocument

I need to read the Excel data using Xmldocument.Plz help me
You shouldn't.
Better use Office Open XML libraries from Microsoft.
I can't give some code but, you have to extract xlsx contents with System.IO.Packaging, find the sheet you need, and then load it in XmlDocument.
But be advised that it is quite tricky and has many caveats to do so.

Data loss in conversion of documents from .odt to .doc

I have a plugin developed for both MS word and Open Office.
Using the open office plugin it is possible to add a set of Marked references (using XNamed) the xml in content.xml for this mark is:
-<text:p text:style-name="Standard">
<text:reference-mark-start text:name="abc"/>hello
<text:reference-mark-end text:name="abc"/>
</text:p>
when I save this document as .doc or .docx and open it in MS word, the mark reference is lost and only plain text (hello) appears. I want to be able to preserve some information like "abc" here.
Is there a way I can programatically change the xml while open office is converting it to doc format, or while ms word is opening the converted document?
Is there a way(in ms word) to "Realize" that the document being opened was created or edited using open office?
I've used C# interop to develop the word plugin and java UNO for open office.
I ended up providing a "compatibility mode" button in my plugins,for modifying the document before saving and after opening...couldnt find a better solution.