This example adds a linked Word document to myDocument
.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
Width:=200, Height:=300, _
FileName:="c:\my documents\testing.doc", link:=True
This example adds a new Microsoft Excel worksheet to myDocument
. The worksheet will be displayed as an icon.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
Width:=200, Height:=300, _
ClassName:="Excel.Sheet", DisplayAsIcon:=True
This example adds a command button to myDocument
.
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
Width:=150, Height:=50, ClassName:="Forms.CommandButton.1"