No method 'TypeText' with matching signature found for class

조회 수: 4 (최근 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 CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by