Trying to access Word doc with MATLAB COM interface returns empty object
Mostrar comentarios más antiguos
I am trying to read the contents of a Word document from MATLAB R2019b using the COM interface. However, even the most simple operations are showing that there is no content in my document, which is not the case:
word = actxserver('Word.Application');
wdoc = word.Documents.Open('C:\somewhere\somefile.docx');
wdoc.Content.Text %indicates that there is no text in my document
wdoc.Sections %indicates that there are 0 sections in my document
MATLAB is not showing any errors or warnings during this process, yet the output is still incorrect. How can I fix this?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Use COM Objects in MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!