Trying to access Word doc with MATLAB COM interface returns empty object
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Use COM Objects in MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!