Read equations from MS Word
Show older comments
Dear all,
I am trying to import all the formulas in a Word document into MATLAB (plain text). The goal would then be to make a script that computes these imported formulas with the data I have.
I have been looking for a solution without any luck. I have tried with actxserver, but it seems like the wdoc.OMaths.ConvertToNormalText function does not exist in MATLAB.
word = actxserver('Word.Application');
wdoc = word.Documents.Open("C:\Users\pehlivanlar\Documents\test.docx");
size(wdoc.OMaths)
wdoc.OMaths.ConvertToNormalText
Unrecognized function or variable 'ConvertToNormalText'.
The original equations were created using Equation Editor 3.0, but I can easily convert them to Office Math ML Format:

Thanks in advance for the help.
Br
2 Comments
Daniel Neubauer
on 4 Nov 2022
is it possible to save your .docx file as a plain text file with *.m extension? then you could just run it
Shivam Malviya
on 7 Nov 2022
Hi Benjamin,
Could you share the word document that contains the equation?
Thanks,
Shivam
Accepted Answer
More Answers (0)
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!