are all the objects that can be placed on a slide.
Slide.Shapes.AddShape . . .
* Slides have a collection of shapes that contains all the shapes on a slide.
* This collection exists even if there are no shapes added to the slide.
* Any shapes added to a slide are added to the slides collection.
sld1.Shapes.AddShape [type, left, top, width, height]
are rectangles, circles, callouts, arrows, stars, flowchart shapes and more.
Add a rectangle shape at left 50, top 50 width 100 and height 200 points.
sld1.Shapes.AddShape msoShapeRectangle, 50, 50, 100, 200
Add a 5 point star shape at left 50, top 200 width 200 and height 200 points.
sld1.Shapes.AddShape msoShape5pointStar, 200, 50, 200, 200
Add a SmileyFace.
sld1.Shapes.AddShape msoShapeSmileyFace, 500, 50, 200, 200
sld1.Shapes.AddPicture [FileName, LinkToFile, SaveWithDocument, left, top, width, height]
Add a picture at left 50, top 50 width 100 and height 200 points.
sld1.Shapes.AddPicture FileName:="C:\pict.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:-50, Top:=150, Width:=200, Height:=200
Adding a picture to a page requires the path and name of the image file.
You must also enter the LinkToFile value, which is True if you want to link to the original image, or False if not.
The SaveWithDocument value is also required. This must be True if LinkToFile is False.
sld1.Shapes.AddTextBox [Orientation, left, top, width, height]
sld1.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, Left:=100, Top:=100, Width:=200, Height:=50).TextFrame.TextRange.Text = "Test Box"
Copyright © 2006-2018, LQSystems,Inc. All rights reserved.