How do I pass a string array to the PowerPoint object Range method in MATLAB 7.0.4 (R14SP2)?
Show older comments
I have created a COM object with a Range method. This method accepts a variant and returns a collection of objects.
ppt_app=actxserver('powerpoint.application')
ppt_app.Visible=1
ppt_presentation=ppt_app.Presentations.Add
ppt_slide=ppt_presentation.Slides.Add(1,'ppLayoutTitleOnly')
figure
plot(1:6,sin(2*pi*4*[1:6]))
print -dmeta -noui
ppt_figure1=ppt_slide.Shapes.Paste
t=1:100;
y=sin(2*pi*.1*t);
plot(t,y)
print -dmeta -noui
ppt_figure2=ppt_slide.Shapes.Paste
shapes=ppt_slide.Shapes
When I try to pass more than one string argument as follows
shapes.Range({'Picture 3'; 'Picture 4'})
I receive the following error
??? Invoke Error, Dispatch Exception:
Source: Microsoft Office PowerPoint 2003
Description: Shapes.Range : Illegal value for ^0. Bad type: expected 1D array of Variants, Integers, Longs, or Strings
Help File:
Help Context ID: 0
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!