Trying to access Word doc with MATLAB COM interface returns empty object
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Use COM Objects in MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!