insert image into slide

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi experts
how to insert image in powerpoint slide . i am using the following code:
appPW.ActiveWindow.Selection.SlideRange.Shapes.AddPicture(strImage,
MsoTriState.msoFalse, MsoTriState.msoCTrue, 1, 1, 1, 1);

but its doing nothing
 
Hi experts
how to insert image in powerpoint slide . i am using the following code:
appPW.ActiveWindow.Selection.SlideRange.Shapes.AddPicture(strImage,
MsoTriState.msoFalse, MsoTriState.msoCTrue, 1, 1, 1, 1);

but its doing nothing

An image 1pt square would be quite small on the slide.
Try changing the last two parameters to 100 instead of 1.

Also, your code assumes that there's at least one slide in the presentation and
that a slide is currently selected. If there are no slides in the presentation
yet, it'll fail. If you're in slide show view, where nothing can be selected,
it won't work either.

Does any of that help?
 
Hi experts
thanks for helping me !
it works fine now,
but i am getting error when there is no slide present.
how i can disable the commandbarbutton when there is no slide present ?
 
Hi experts
thanks for helping me !
it works fine now,
but i am getting error when there is no slide present.
how i can disable the commandbarbutton when there is no slide present ?

Disabling it when no slides are present would be a bit complicated.

Why not do this instead:

If Presentations.Count = 0 Then
Exit Sub
Else
' Your code here
End if
 
Back
Top