Hello:
I'm trying to write a macro script that will insert an image into slide #2 of a powerpoint presentation.
I can write one no problem that drops images into slide #1. The problem I seem to be having is accessing the method or property setting for slides other than slide #1.
With SlideShowWindows(1).View
.GotoSlide 2
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="E:\Reports\Business_Solution\OTIS\Images\OTIS_NOIbyMonthGraphgraph1.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=26, Top:=214, Width:=488, Height:=292).Select
End With
The above code snippet is basically a copy from PowerPoint VBA help, but returns an error message of
slideshowwindows(invalid member): Integer is out of range. 1 is not in the range of 1 to 0
Any help would be appreciated.
I'm trying to write a macro script that will insert an image into slide #2 of a powerpoint presentation.
I can write one no problem that drops images into slide #1. The problem I seem to be having is accessing the method or property setting for slides other than slide #1.
With SlideShowWindows(1).View
.GotoSlide 2
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="E:\Reports\Business_Solution\OTIS\Images\OTIS_NOIbyMonthGraphgraph1.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=26, Top:=214, Width:=488, Height:=292).Select
End With
The above code snippet is basically a copy from PowerPoint VBA help, but returns an error message of
slideshowwindows(invalid member): Integer is out of range. 1 is not in the range of 1 to 0
Any help would be appreciated.