How do I programatically control Power Point from MATLAB?

I am trying to programatically control Power Point from MATLAB.
I want to use the Group and Ungroup methods such that I can group and ungroup shapes.
How do I use these two methods via MATLAB?

Antworten (3)

Walter Roberson
Walter Roberson am 26 Jan. 2011

0 Stimmen

I do not know the specific way to get to Group and Ungroup, but this previous cssm discussion should provide some useful hints in getting started and hints about naming conventions.
Once you have created the ActiveX control, you can probably use the methods() function and the get() function to probe the routines and properties that are available.

7 Kommentare

Also, make use of MSDN reference library for PowerPoint (http://msdn.microsoft.com/en-us/library/bb265987(v=office.12).aspx)
hi,
yours was useful,but still one step further i need a solution ie
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
.AddShape(msoShapeIsoscelesTriangle, 10, _
10, 100, 100).Name = "shpOne"
.AddShape(msoShapeIsoscelesTriangle, 150, _
10, 100, 100).Name = "shpTwo"
.AddShape(msoShapeIsoscelesTriangle, 300, _
10, 100, 100).Name = "shpThree"
With .Range(Array("shpOne", "shpTwo", "shpThree")).Group
.Fill.PresetTextured msoTextureBlueTissuePaper
.GroupItems(2).Fill.PresetTextured msoTextureGreenMarble
End With
End With
this is a piece of example code from msdn site as you gave for my help .I want to get an equivalent code of With .Range(Array("shpOne", "shpTwo", "shpThree")).Group
this line in matlab.
The key is the Array stucture in matlab,so my problem will be solved
thanks all of you
thisshape = myDocument.Shapes;
thisshape.AddShape(msoShapeIsoscelesTriangle, 10, 0, 100, 100).Name = 'shpOne';
thisshape.AddShape(msoShapeIsoscelesTriangle, 150, 10, 100, 100).Name = 'shpTwo';
thisshape.AddShape(msoShapeIsoscelesTriangle, 300, 10, 100, 100).Name = 'shpThree';
thisgroup = thisshape.Range(Array('shpOne', 'shpTwo', 'shpThree')).Group;
thisgroup.Fill.PresetTextured msoTextureBlueTissuePaper;
thisgroup.GroupItems(2).Fill.PresetTextured msoTextureGreenMarble;
clear thisgroup;
clear thisshape;
It is possible that you might have to break up the AddShape and assignment of the name in to two different statements.
hi,
thisgroup = thisshape.Range(Array('shpOne', 'shpTwo', 'shpThree')).Group;
when i run the above line of code i get this error from matlab
??? Undefined function or method 'Array' for input arguments of type 'char'.
expecting a soln for this
thanks all of you
I suspect you will need to use System.Array instead of Array . It might perhaps be more complicated than that, though.
I have not yet been able to find documentation about the exact class that Array returns, but my suggestion would be to try using
thisgroup = thisshape.Range({'shpOne', 'shpTwo', 'shpThree'}).Group;
I make no promises on this, as I am not familiar with this interface.
hi,
still trying i tried your both solns hoping to get but...
anyway thanks for your help if you come across any share it
thanks all of you

Melden Sie sich an, um zu kommentieren.

Brett Shoelson
Brett Shoelson am 4 Feb. 2011

0 Stimmen

Also: If you're interested in "going the other way," Consider looking at this Calling MATLAB from PowerPoint, on the MATLAB Central File Exchange! I often run my MATLAB demos directly from my Powerpoints.
Cheres,
Brett

1 Kommentar

Brett, do you know how to "embed" MATLAB figures into PowerPoint so that you can interact with it (zoom, pan, rotate)? There's a question here: http://www.mathworks.com/matlabcentral/answers/776-how-can-i-put-a-matlab-figure-in-a-presentation-and-rotate-the-axes-during-the-presentation

Melden Sie sich an, um zu kommentieren.

John
John am 7 Jul. 2013

0 Stimmen

You may also open/read/move/convert/repair powerpoint files by the use of tool to fix powerpoint files

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 26 Jan. 2011

Community Treasure Hunt

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

Start Hunting!

Translated by