When I make calls through the MATLAB .NET interface using long statements, I sometimes receive unexpected errors. For example when I try to use the Microsoft PowerPoint API in the following line:
newslide.Shapes.Title.TextFrame.TextRange.Text='.NET Powerpoint Demo';
This generates an error:
??? Setting the 'TextRange' property of the 'Microsoft.Office.Interop.PowerPoint.TextFrame' class is not allowed.
Sometimes it seems that the actual code has been executed as the objects in my .NET code have changed, even though an error occured.
Best Answer