Sub
Bild ()
Dim
objShape
As
Shape, objSlide
As
Slide
Dim
Auswahl
As
Variant
Dim
i
As
Integer
Set
objSlide = ActivePresentation.Slides(2)
With
Application.FileDialog(msoFileDialogFilePicker)
.Title =
"Bitte Grafik auswählen"
.InitialFileName =
"C:\Windows\Benutzer\Anlagen\Bild1"
If
.Show = -1
Then
Auswahl = .SelectedItems(1)
Else
Exit
Sub
End
If
End
With
Set
objShape = objSlide.Shapes.AddPicture(FileName:=Auswahl, LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=20, Top:=120, Width:=-1, Height:=-1)
With
objShape
.LockAspectRatio = msoTrue
If
.Height > 30
Then
.Height = 300
End
If