batch import images to separate slides

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

Guest

i would like to batch import images to separate slides. Is there a way to do
this without having to purchase anything extra? dont want to use the
photoalbum feature as this is no good for my purposes. any help would be
appreciated.

p.s.: has anyone tried to insert a script into powerpoint. " the following
is intended as sample code for quick one-time uses or as an example to get
started writing your own macros " from:
http://www.rdpslides.com/pptfaq/FAQ00352.htm. If anybody knows how to use
this please send me an email. thanks. email: (e-mail address removed)

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
 
p.s.: has anyone tried to insert a script into powerpoint. "

I've done it a time or two.
the following
is intended as sample code for quick one-time uses or as an example to get
started writing your own macros " from:
http://www.rdpslides.com/pptfaq/FAQ00352.htm. If anybody knows how to use
this please send me an email. thanks. email: (e-mail address removed)

Sorry, no email - it's not the Cowboy Way.
Wait. I'm not a cowboy. Oh, I got it. It's not the Newsgroup Way.
Yeah.

But here ya go. Read this, then have a go with the code you found. Post back
here if you run into problems.

How do I USE this VBA stuff in PowerPoint?
http://www.rdpslides.com/pptfaq/FAQ00033.htm
 
Back
Top