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=1ppt_presentation=ppt_app.Presentations.Addppt_slide=ppt_presentation.Slides.Add(1,'ppLayoutTitleOnly')figureplot(1:6,sin(2*pi*4*[1:6]))print -dmeta -nouippt_figure1=ppt_slide.Shapes.Pastet=1:100;y=sin(2*pi*.1*t);plot(t,y)print -dmeta -nouippt_figure2=ppt_slide.Shapes.Pasteshapes=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
Best Answer