HTML pages with MathML opened in MS Word - ms-word

I would like to open an HTML page with MS Word (Microsoft Office Standard 2019). The page contains MathML codes, e.g. this page.
If I save it and open with MS Word, the formulas appear as normal text, mathematical formatting is completely lost.
In this post I see a trick to import a MathML formula into MS Word, i.e. copy the code in Wordpad, then copy from wordpad and paste into MS Word. It is just an easter egg, not a real solution. When I try with a full page, indeed, it does not work.
This is very annoying, since MS Word is clearly able to correctly interpret MathML codes but it doesn't when needed. I guess that it is just a commercial decision, to promote the OOXML codes instead of MathML.
Is there a method to convince MS Word to work properly with MathML code? I would like to right-click on a .html file, select "open with Word", and see the correct MathML formulas.

Related

Can I define a custom tag in Office 365?

Is there a way to create a custom tag in MS Office 365 data such as Word, Excel, Powerpoint files?
I am envisioning something "invisble" when I print the Word Document, but still machine-readable for a parser. There was something like "smart tags" previously, but this seems to be left behind.
You can try using Actions as was suggested on the Smart Tag in Word 2016 page. In all other case you'll have to introduce your own system to mark document pieces, so your add-in could react to them.

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.

Copy a dynamically generated PHP Web page to Word 2010 with Diagrams

I am creating a PHP generated report page (using a back-end DB for values), which contains images. This page is then copied and pasted to MS Word, where I run a few macros on it to generate some figures.
I used to use MS Word 2003 earlier and there was no problem with the copy of the page and images, but when I upgraded to MS Word 2010, the images do not get copied.
The PHP page is password protected and uses HTTPS, where I have to enter a Username and Password for the final report page to be displayed. In Word 2003, the user dialog used to appear, but it does not do the same for Word 2010.
Is there some setting in Word 2010, which I need to enable for the images to be shown and/or the user/password dialog prompt to appear?
One way which I have found is to copy the content to a New Outlook message window. This way all the images and text comes up, then copy from there onto the MS Word document. Not sure how and why, but both the images and text show up there, although the alignment is a bit skewed.
(I even tried un-checking the box for "Show Image Placeholders" in the Advance options of MS Word 2010, but still no effect.)

How to enable copy/paste formatted text from Lotus Notes to TinyMCE?

This question was previously posted to the TinyMCE HowTo Forum with no responses. Here's hoping that someone out there has encountered (and solved) this issue.
The question: Is there some way to enable correct copy/paste of formatted text from a Lotus Notes email directly into TinyMCE?
The scenario: A rolling comments system on a web site, into which users occasionally need to paste rich text from an email viewed in Lotus Notes.
The details:
I have tried copying some formatted text from emails viewed in Lotus Notes (7.0.4, Windows XP) and pasting it into the "Full featured example" implementation of TinyMCE at http://tinymce.moxiecode.com/examples/full.php and found that it generally fails to maintain the formatting. In fact, of the browsers I tested, IE6 fared the best, and the more modern W3C standards compliant browsers were the worst.
Some text formatting I tested was:
larger text
underline
italics
bold
numbered list
bullet list
indented text
permanent pen
font family: arial
font family: times new roman
Results:
-Firefox (3.6.8), Vista or XP: all formatting lost
-Chrome (5.0.375.125), Vista or XP: all formatting lost, including line breaks
-IE6 (XP): some formatting is maintained (fails to copy numbers and bullets for lists, but indents lists properly)
-IETester (IE6) Vista: some formatting is maintained (fails to format lists at all, and the underline tag is not closed)
-IE7 (XP): some formatting is maintained (fails to format lists at all, and the underline tag is not closed)
-IE8 (Vista): some formatting is maintained (fails to format lists at all, and the underline tag is not closed)
If I first paste the clipboard from Lotus Notes into MS Word 2003 (11.5604.5606) it shows perfectly in Word, and if I then copy/paste it from there into TinyMCE it generally works better enough to be usable, although still loses some formatting, even when using the "Paste from Word" button in TinyMCE. Not surprisingly, if I open my Lotus Notes mail in a web mail client, the HTML mail copies and pastes perfectly into TinyMCE.
Since it shows perfectly in my Domino web client, and pastes perfectly into MS Word, it is obviously possible to copy/paste Lotus Notes formatting.
If anyone has had success with this please mention your Notes and browser versions, and any modifications you had to make to the TinyMCE config.
If you check what's pasted from Word, you'll find that it's pretty much what you'd get if you had done a File->Save As->Web Page in Word: a whole bunch of Word-specific HTML attributes and CSS. Essentially, it's Word's ability to be coerced into exporting HTML that does the trick; Word's rich text alone won't do the job. The Notes clipboard (which is different from the system clipboard) can export RTF to the system clipboard, which then pastes (with limitations) to Word (which can interpret RTF), but a JavaScript widget in the browser doesn't understand RTF.
You can use the w32 api to do your formatted copy (e.g. make a special copy btn in LotusScript and call it). I have actually done this, and it works fine.
however, will TinyMCE handle the paste operation well? - that I cannot tell you.
I have logged this as a bug against TinyMCE.
Ok, then eigther you will need to deactivate the paste plugin and write a plugin of your own or you will have to configure/change the paste plugin to your needs.
If I first paste the clipboard from Lotus Notes into MS Word 2003 (11.5604.5606) it shows >perfectly in Word, and if I then copy/paste it from there into TinyMCE it generally works >better enough to be usable,
Thing is, that your OS detects (at least sometimes) from which kind of context (plain text, html,...) copy-paste is done. That probably is the reason why copying it first into Word helps a bit.

Copy from Ms Word and paste into Rich Textbox problem

I have a problem when pasting ms word content into richtextbox.
when I copy content of word document and paste it into richtextbox which is in a windows application written in C#.
the links are shown like that ;
This is test.. Go to Google. <http://www.google.com>
Mail : Project <mailto:cbn#test.com>
The issue can also be created by loading in an saved RTF document from word.
How can I correct this, please help..
thanks in advance.
The issue here is that you're not actually copying RTF into the clipboard from Word. Well, kind of, but not the same RTF that would display just the formatted text and have a hyperlink behind it. You'd have to handle the paste event and do your own parsing and reformatting to achieve that.
Some richtextbox editors have a "Paste from Word" feature. You can paste it in a simple textbox and start re-formatting based on the rich text editor you're using.
This behavior has nothing to do with Word. In fact even though the RTF produced in the Clipboard by MS Word is slightly different from that of OpenOffice the results are identical. See screenshot below where the top two links are from MS Word and the rest from OOo 3.2.
.
It seems to be a peculiarity in the drawing of hyperlinks in the Winforms RichTextBox.
I don't see a quick workaround to change this behavior though.