No method 'TypeText' with matching signature found for class

6 ビュー (過去 30 日間)
Virgil Bell
Virgil Bell 2015 年 4 月 3 日
回答済み: Simone Lojeck 2019 年 4 月 25 日
>> gen_Word_report
No method 'TypeText' with matching signature found for class
'Interface.00020975_0000_0000_C000_000000000046'.
Error in gen_Word_report (line 42)
actx_word.Selection.TypeText(cell2mat(req_text(i2,1)));
Above is the error I get when using the activeX functionality in MatLab to create a Word document. Here is the weird thing, it works just fine for 12 out of 13 uses of the very same script. However, on this one use it always fails at the same point after several minutes of creating the word document.
Anyone have an idea on how to begin troubleshooting this?

回答 (1 件)

Simone Lojeck
Simone Lojeck 2019 年 4 月 25 日
I received the same error and found this posting searching for solutions. I'm adding a comment to help anyone who finds this in the same way I did.
As I've said I received the same error in a similar situation: code runs w/o error for several iterations then fails on a specific case.
I did some step by step debugging and found that the text I was sending the selection.TypeText command on the iteration w/error was indeed different. It was expecting a text string (in my case {text}), however I was sending it an empty string ({[]}), which caused the error. I fixed this and the script no longer failed.
I'd recommend seeing exactly what input is being sent to the TypeText cmd.

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by