Inserts a PowerPoint shape object onto the active slide
Usage:
pptInsertShape (object me, integer x, integer y, integer w, integer h, integer shapeType )
Parameters:
x (integer) - left position of the new shape
y (integer) - top position of the new shape
w (integer) - width of the new shape
h (integer) - height of the new shape
shapeType (integer) - a native PowerPoint shape type in the range of 1 to 135
Returns:
(integer) - The success code
Example:
xtRose = xtra("Rosetta").new( )
xtRose.pptLaunch( )
xtRose.pptNewBlank( )
xtRose.pptAddSlide( 1 )
-- inserts all 135 shape types into the active slide
nX = 0
nY = 0
nW = 50
nH = 50
repeat with i = 1 to 135
put xtRose.pptInsertShape(nX, nY, nW, nH, i)
nX = nX + nW
if ( nX > xtRose.pptWidth( ) ) Then
-- increment row
nX = 0
nY = nY + nH
end If
end repeat
xtRose.pptSave( "C:\new.ppt" )
xtRose.pptClose( )
xtRose.pptQuit( )
Notes:
All shapes defined here are PowerPoint 97 compatible. Newer versions of PowerPoint may contain more shape types, however for maximum compatibility, only the 135 defined types are permitted.