Selected Slide Count

D

Dileep

Hello,
I developed an application using c#.net 2008 and vsto. I have 5
slides.
I selected 3 slide out of 5. I want to insert image these selected 3 slide
by using code. How can i?

Thanks
Dileep
 
D

David Marcovitz

Hello,
I developed an application using c#.net 2008 and vsto. I have 5
slides.
I selected 3 slide out of 5. I want to insert image these selected 3 slide
by using code. How can i?

Thanks
Dileep

This is totally off the top of my head and in VBA, but it might work, and
you might be able to translate it:

For Each oSld In ActiveWindow.Selection.SlideRange
oSld.Shapes.AddPicture "myFile.jpg"
Next oSld

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
D

Dileep

Thanks
It is working

Steve Rindsberg said:
In general, and in VBA:

Dim oSl As Slide
Dim oSh As Shape

For Each oSl In ActiveWindow.Selection.SlideRange
Set oSh = oSl.Shapes.AddPicture("c:\temp\file20937.gif", _
False, True, 0, 0, 100, 100)
Next

This'll help correctly size the picture:

Insert a picture at the correct size
http://www.pptfaq.com/FAQ00329.htm


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/

Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top