Importing Multiple Images

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I have pictures of a party that I want to share with my co-
workers. In the past I have opened a blank slide, inserted
the first picture, opened a new blank slide, inserted the
second picture... Does anyone know how to insert multiple
images at once, and have them be inserted one to a page?
 
This is intended as sample code for quick one-time uses or as an example
that'll help you get started writing your own macros. If you're looking for
a reliable production tool for batch importing images into slides, please
see BATCH IMPORT images into PowerPoint


Sub ImportABunch()

Dim strTemp As String
Dim strPath As String
Dim strFileSpec As String
Dim oSld As Slide
Dim oPic As Shape

' Edit these to suit:
strPath = "c:\My Pictures\"
strFileSpec = "*.jpg"

strTemp = Dir(strPath & strFileSpec)

Do While strTemp <> ""
Set oSld = ActivePresentation.Slides.Add(ActivePresentation.Slides.Count
+ 1, ppLayoutBlank)
Set oPic = oSld.Shapes.AddPicture(FileName:=strPath & strTemp, _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=0, _
Top:=0, _
width:=100, _
height:=100)

' Reset it to its "real" size
With oPic
.Scaleheight 1, msoTrue
.Scalewidth 1, msoTrue
End With

' and optionally, make it fill the slide - to do that, uncomment the
following:
' With oPic
' .height = ActivePresentation.PageSetup.Slideheight
' .width = ActivePresentation.PageSetup. Slidewidth
' End n

' Get the next file that meets the spec and go round again
strTemp = Dir
Loop

End Sub

Hope this will work
Suvodip.

This is taken from : http://www.rdpslides.com/pptfaq/FAQ00352.htm

----- Original Message -----
From: "Greg" <[email protected]>
Newsgroups: microsoft.public.powerpoint
Sent: Monday, July 12, 2004 6:15 PM
Subject: Importing Multiple Images
 
You might want to explore products like Photo Album, Image Importer Wizard,
etc to make it easy for you to import pictures:

You have several options:

Photo Album for PowerPoint 2000
http://office.microsoft.com/downloads/2000/album.aspx
http://www.indezine.com/products/powerpoint/ppphotoalbum.html

Photo Album for PowerPoint 2002/03 is built-in within PowerPoint 2002/03

Image Importer Wizard
http://www.mvps.org/skp/iiw.htm
http://www.indezine.com/products/powerpoint/addin/iiw.html

PowerTools Import Export
http://www.corpimaging.com/PowerTools/Index.htm
http://www.indezine.com/products/powerpoint/addin/powertools.html


--
Geetesh Bajaj, Microsoft PowerPoint MVP
PowerPoint Notes: http://www.indezine.com/notes
Free Templates:
http://www.indezine.com/powerpoint/templates/freetemplates.html

Technical Specialist, PowerPoint Live
http://www.powerpointlive.com
 
In PowerPoint 2002 you can select Insert -> Pictures -> New Photoalbum then
you can select a bunch of pictures from any folder into the area Pictures in
Album. After you selected all the pics you just click on Create and
PowerPoint creates a series of slides each being one picture of the ones you
selected.
I creating all my holiday presentations this way and found it is the fastest
way to create a show.

Good luck
 
Back
Top