Your Ad Here

Monday, May 18, 2009

Insert multiple pictures into Powerpoint slides in less than 1 minutes

Insert multiple pictures into Powerpoint slides in less than 1 minutes!
Power point Pictures, Images and Photos
Let say, if you want to put 100 pictures into PowerPoint, and each slide should only have 1 picture only, how will you do? Do you insert one by one? It will take at least half an hour or more.

Here I show you a way that can do it in less than 1 minutes!

1. Open PowerPoint.
 
2. Goto Tools Menu->Macro->Macros
 
3. Type Macro1
 
4. Press Create button.
 
5. Paste the following code:

Sub Macro1()
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog( _
Type:=msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
mleft = InputBox("x:")
mtop = InputBox("y:")
mwidth = InputBox("Width (Default=720):")
mheight = InputBox("Height (Default=540):")
If mleft = "" Then mleft = 0
If mtop = "" Then mtop = 0
If mwidth = "" Then mwidth = 720
If mheight = "" Then mheight = 540
n = 1
With dlgOpen
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
ActivePresentation.Slides.Add( _
Index:=n, _
Layout:=ppLayoutBlank).Select
ActiveWindow.Selection.SlideRange.Shapes.AddPicture( _
FileName:=vrtSelectedItem, _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=mleft, _
Top:=mtop, _
Width:=mwidth, _
Height:=mheight).Select
n = n + 1
Next vrtSelectedItem
Else
End If
End With
Set dlgOpen = Nothing
End Sub
 
6. Return to PowerPoint.
 
7. Goto Tools Menu->Macro->Macros
 
8. Select Macro1 and press Run button.
 
9. Input the position of the picture, coordinate x
(Press Enter without typing anything will set x=0)
 
10. Input the position of the picture, coordinate y
(Press Enter without typing anything will set y=0)
 
11. Input width of the picture
(Press Enter without typing anything will set width=720)
 
12. Input height of the picture
(Press Enter without typing anything will set height=540)
 
13. Select the multiple files you want to insert and press OK button.
 
14. Done! 

2 comments:

  1. You can also goto insert Photo Album and select the pictures you want to include in your slideshow. This gives you more options like inserting 1,2,or 4 pictures with caption and title.

    Hope this helps

    ReplyDelete
  2. Thanks Daina, your macro works the best. I had to change the size to 1152x648 or 16x9, but it worked perfectly. The insert photo album didn't give me the option of sizing my pictures. Thank You!

    ReplyDelete