Word taskpane add-in is disabled when working with an rtf or odt document - ms-word

I am trying to develop a Word add-in which is written in JS and makes use of the OfficeJS library. When I open an rtf or odt file, the taskpane button to open the add-in is disabled. However, the plugin runs fine when working with docx files.
Takepane button when looking at odt
The Office add-in documentation doesn't make me aware of any limitations regarding the aforementioned file types.
Does anyone have any workarounds to get this working?

This is expected. Office add-ins do not support RTF or ODT formatted files. You will have to convert the file to docx to run add-ins.

Related

Update docvariable or docproperty in Word online

Is ther a way to update docvariable or docproperty of a Word document when opening in the Word online by the microsoft graph API or another API.
I do this in Word for desktop using C# code, but I need to do this in Word online too.
It can't be done in Word on-line. If you had an Office JS add-in you might be able to change document properties (but no DocProperty fields that reflect those values). The Word JS APIs do not access the Document Variables, however.
But you should be able to do it on the closed file (before it's opened in Word on-line, for example) by leveraging the Word Open XML file format. There are numerous libraries to work with it. Microsoft's is the Open XML SDK (free, as a .NET Framework / Visual Studio extension) which can access all content of Office files (except VBA binaries).

Programmatically convert Doc(x) files to PDF using Microsoft Word

We are developing a Java application that needs to programmatically convert .rtf, .doc and .docx files to PDF files.
Formatting is important to us, so we need the page numbers to be the same between a source file and a target PDF file, and the contents of each page being the same as the original file.
We have tried out open source solutions, such as JODConverter to invoke a LibreOffice of OpenOffice installation, Docx4j and XDocReport. The best formatting was achieved with LibreOffice. However, even in that case, the pages were different (for example, a 87-page .rtf file results in an 80-page PDF file).
So, we think that the ideal way to make the conversion would be to somehow invoke Microsoft Word though our Java application, and make the conversion with it. That would produce PDF files that have the same formatting as the original files.
Is this possible in any of the following ways:
An API that is directly invokeable through Java?
An API that is invokeable through a .Net language and we would use that with something like JACOB?
A 3rd party library that uses a Microsoft Word installation under the hood (something like JODConverter for Word)?
A CLI interface supported by Word (relevant question)?
Something else?

What file formats can openXML save?

Looking at the openXML SDK 2.5 page http://msdn.microsoft.com/en-us/library/office/gg278315(v=office.15).aspx I can't see where it specifies what document formats it can create, where would I find this on the site?
OpenXml SDK 2.5 supports saving the following Microsoft Office files:
Word (.docx)
Excel (.xlsx)
PowerPoint (.pptx)
It further supports document files in both conformance clauses, "transitional" and "strict".
"Strict" files can be read by Microsoft Office since Office 2010 and they can be created by Microsoft Office 2013 (and later).
But in the end - since you are manipulating the raw Xml-code in the files, using the SDK, you can basically do anything you like ... and screw things up as much as you like.
:-)

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.

Convert from Microsoft Word to Media Wiki Markup Style

How do I export a word document to media wiki markup style
I have been trying to do it by following the steps given in http://en.wikipedia.org/wiki/Help:WordToWiki
but all in vain, not getting it.
Any help please.
Best way is to use Open Office
Open the Word document in Open Office Writer.
Go to File / Export.
Under File format choose MediaWiki (.txt).
Click Save (or Export).
Open the new file in a text editor and copy the contents to the clipboard.
Paste the text to a Wikipedia article.
That is copy and pasted from the document you linked to.
For Open Office 4.15 you have to add the extension Sun Wiki Publisher 1.1 with the extension manager.
If you don't want to install OpenOffice, another option is the Word2MediaWikiPlus extension.
In Microsoft Word 2016 I use the plugin "Microsoft Office Word Add-in For MediaWiki" (already suggested by Jake). https://www.microsoft.com/en-us/download/details.aspx?id=12298
To make it work in Microsoft Word 2016 (version 16.0). I followed these instructions but replaced "15.0" in the instruction to "16.0",
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_other/using-microsoft-office-word-add-in-for-mediawiki/449726c2-6d08-45e1-919a-4b5082ab4b5b
Microsoft has released an add-in for Microsoft Word that lets you export a doc file to MediaWiki formatting (as a .txt file). It's fairly decent.
http://www.microsoft.com/en-us/download/details.aspx?id=12298
If you're going to be doing this a lot, consider installing the FCK Editor. This has a Paste From Word button.
The easiest way may be to install LibreOffice (http://libreoffice.org) and open the Word document in its Writer application, then from there do Export and save to Media Wiki txt file. The Copy-paste that text into the Media Wiki at edit mode
but there was no way for adding images automatically that won't work for libreoffice or the word plugin.
If you have only a few docs for converting to the mediawiki, it is ok.
But if there ar more the it is great deal of time and effort.
For autom. Imageupload the only working solution was the discontinued project Word2MediaWikiPlus.
If somethings has changed in the last years let it me now.
But if not there are some solutions with work without image upload
(if I found them i will add these entry here):
- on webserer projekt which generated very good wiki markup output there , i can' t remember the name.
- a commandline tool that do the conversion as input and output file