# How to import a Microsoft Word document into Mathematica?

I have a Microsoft Word document in DOCX format. I need to import it into Mathematica as a String preserving all formatting (font, size, bold/italic style, colors, etc), tables and embedded images with highest possible fidelity (Mathematica strings support formatting and arbitrary embedded expressions including images). All text should remain editable, so it should not be converted to an image. Is there a way to do this?

I can convert the document to RTF, PDF, XPS, MHT or ODT format before importing, if it helps.

• RTF would be a likely candidate - but what have you tried so far? – cormullion Jun 22 '13 at 10:22
• There is one plugin about MathType and Word Called Word2Tex, maybe also helpful for formulas. – HyperGroups Jun 23 '13 at 2:09
• I DID it 6 months after you asked, see here: mathematica.stackexchange.com/a/65687/1056 – WolframFan May 6 '18 at 3:32

David Carlisle wrote about it back in 2007. The process seems to be rather cumbersome and I have not checked myself if it is reliable working but here are some links that might help you on your specific problem:

XHTML and MathML from Office 2007

Going Wordless at the Advanced Mathematica Summer School

• Hi Stefan, can you show me a little about how to obtain the formulas in Word(maybe Mathtype form) in Notebook? I've tried a little, and Import .xml file(obtain form word) to Notebook. – HyperGroups Jun 23 '13 at 2:08
• @HyperGroups sorry about my late answer. Embarrassingly no :(. I have no windows and on my mac I do have (astonishingly) Word 2011, but the equation editor is different from the windows version. I've tried it out, but the equations are immediately converted into jpg after exporting...sorry about that. I only had those links and posted them as an answer (concealing the fact, that I'm hopelessly clueless about any Office related question; failing even using these applications) – Stefan Jun 23 '13 at 11:35
• I DID it 6 months after it was asked, see here: mathematica.stackexchange.com/a/65687/1056 – WolframFan May 6 '18 at 3:33