S
Stephan
Hello,
I use PowerPoint 2003 and I want to automatically add several pictures to a
slide with a layout with an addin.
If I do it manually I create a new slide with the e.g. 3 picture
placeholders I add a picture to every placeholder. If I now change the layout
the pictures will change/move too.
If I do this with my addin, I can identify the placeholders, add a picture
the same size but if I later change the layout the picture don't move.
Here comes my code:
For Each tmpShape In tmpActiveSlide.Shapes.Placeholders
If tmpShape.PlaceholderFormat.Type =
PowerPoint.PpPlaceholderType.ppPlaceholderBitmap Or _
tmpShape.PlaceholderFormat.Type =
PowerPoint.PpPlaceholderType.ppPlaceholderObject Then
tmpX = tmpShape.Left
tmpY = tmpShape.Top
tmpActiveSlide.Shapes.AddPicture(dlgOpenFileDialog.FileName,
MsoTriState.msoFalse, MsoTriState.msoCTrue, tmpX, tmpY, tmpShape.Width,
tmpShape.Height)
End If
Next
--Stephan
I use PowerPoint 2003 and I want to automatically add several pictures to a
slide with a layout with an addin.
If I do it manually I create a new slide with the e.g. 3 picture
placeholders I add a picture to every placeholder. If I now change the layout
the pictures will change/move too.
If I do this with my addin, I can identify the placeholders, add a picture
the same size but if I later change the layout the picture don't move.
Here comes my code:
For Each tmpShape In tmpActiveSlide.Shapes.Placeholders
If tmpShape.PlaceholderFormat.Type =
PowerPoint.PpPlaceholderType.ppPlaceholderBitmap Or _
tmpShape.PlaceholderFormat.Type =
PowerPoint.PpPlaceholderType.ppPlaceholderObject Then
tmpX = tmpShape.Left
tmpY = tmpShape.Top
tmpActiveSlide.Shapes.AddPicture(dlgOpenFileDialog.FileName,
MsoTriState.msoFalse, MsoTriState.msoCTrue, tmpX, tmpY, tmpShape.Width,
tmpShape.Height)
End If
Next
--Stephan