Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2013, 08:38 AM
deepbiomed deepbiomed is offline auto image extractor from folder to powerpoint Windows XP auto image extractor from folder to powerpoint Office 2007
Novice
auto image extractor from folder to powerpoint
 
Join Date: Apr 2013
Posts: 1
deepbiomed is on a distinguished road
Post auto image extractor from folder to powerpoint

Hi,

I have list of file names in excel and all those files with some other unwanted files (images) are present in one folder. Is there any way i can write a command or macro to extract the files listed in excel from the folder into PowerPoint slides automatically ? and if there is a way to do that, can i also import these files with specific size ?

best


Deep

This is cross posted here:
http://www.vbaexpress.com/forum/showthread.php?t=45891

Last edited by JohnWilson; 04-09-2013 at 12:57 PM. Reason: cross post
Reply With Quote
  #2  
Old 04-09-2013, 12:56 PM
JohnWilson JohnWilson is offline auto image extractor from folder to powerpoint Windows 7 64bit auto image extractor from folder to powerpoint Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

When you post is several forums please say so! It stops people working on problems solved elsewhere.
You need really to give more detail (including how much you know!)

Assuming the folder is at "C:\Pics\" (change the code to suit) AND the list of images starts at "A1" then "A2" etc

Try this in PowerPoint (You will need to set a reference to Excel) Excel file must be open and active

Sub Pic_Choose()
Dim i As Integer
Dim XLApp As Excel.Application
Dim pptSlide As Slide
Dim pptShape As Shape
Dim strFolder As String
strFolder = "C:\Pics\" ' change to suit
Set XLApp = GetObject(Class:="Excel.application")
Do Until IsEmpty(XLApp.Range("A1").Offset(i, 0))
Set pptSlide = ActivePresentation.Slides.Add(ActivePresentation.S lides.Count + 1, ppLayoutBlank)
Set pptShape = pptSlide.Shapes.AddPicture(FileName:=strFolder & XLApp.Range("A1").Offset(i, 0), _
LinkToFile:=False, _
SaveWithDocument:=True, _
Left:=10, Top:=10, Width:=-1, Height:=-1) '-1 =True (original size)
'to change size
pptShape.Width = 3 * 72 '=3 inches (72 points= 1 inch)
i = i + 1
Loop
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply

Tags
automatic, images, import



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint 2010 image quality puzzle virginiasb PowerPoint 3 08-30-2012 05:22 AM
Auto update image in a PowerPoint file expert4knowledge PowerPoint 0 05-28-2012 06:04 PM
URGENT!!! Powerpoint Image Formatting and Positioning Macro mertulufi PowerPoint 5 12-20-2011 10:14 AM
Powerpoint + paste in image with fixed width erki PowerPoint 0 09-19-2010 11:23 PM
auto image extractor from folder to powerpoint PowerPoint 2007 ~ How to SAVE IMAGE w/o (White Background)? quantass PowerPoint 3 08-20-2010 01:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft