A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Re :Importing Multiple Images



 
 
Thread Tools Display Modes
  #1  
Old December 31st, 1998, 08:17 PM
Suvodip Moitra
external usenet poster
 
Posts: n/a
Default Re :Importing Multiple Images

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.S lides.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"
Newsgroups: microsoft.public.powerpoint
Sent: Monday, July 12, 2004 6:15 PM
Subject: Importing Multiple Images


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?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting & formatting multiple images to slides Paul k Powerpoint 3 June 23rd, 2004 06:53 PM
Pasting images frustration pjp New Users 2 June 18th, 2004 11:27 PM
Importing and scaling images Colin Wilson Powerpoint 7 June 2nd, 2004 04:21 PM
Images don't print when printing from PDF TomAL Publisher 1 May 5th, 2004 09:22 AM
Multiple Conditions and Multiple Solutions Frank Kabel Worksheet Functions 0 February 4th, 2004 10:22 PM


All times are GMT +1. The time now is 09:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.