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  

Importing and scaling images



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 02:20 PM
Colin Wilson
external usenet poster
 
Posts: n/a
Default Importing and scaling images

Is there a way in Powerpoint to:

a. Make a picture scale automatically to the page size when importing
(i.e. not having to drag a larger image to a smaller size using the
handles), and/or

b. After inserting a picture using a "file link", changing the file link
to another file?

I'm looking for a way of inserting a large number of pictures so each
one exactly fits separate slides. The PP presentation size is normal
screen res of 1024 x 768, but the pictures are 2560 x 1924. Individually
scaling each picture is literally a "real drag"!

--
Thanks
Colin Wilson

  #2  
Old May 24th, 2004, 02:28 PM
Bill Foley
external usenet poster
 
Posts: n/a
Default Importing and scaling images

You might want to look at the Image Import Wizard:

http://www.mvps.org/skp/iiw.htm

--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm

"Colin Wilson" wrote in message
...
Is there a way in Powerpoint to:

a. Make a picture scale automatically to the page size when importing
(i.e. not having to drag a larger image to a smaller size using the
handles), and/or

b. After inserting a picture using a "file link", changing the file link
to another file?

I'm looking for a way of inserting a large number of pictures so each
one exactly fits separate slides. The PP presentation size is normal
screen res of 1024 x 768, but the pictures are 2560 x 1924. Individually
scaling each picture is literally a "real drag"!

--
Thanks
Colin Wilson



  #3  
Old May 24th, 2004, 03:16 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default Importing and scaling images

Is there a way in Powerpoint to:

a. Make a picture scale automatically to the page size when importing
(i.e. not having to drag a larger image to a smaller size using the
handles), and/or


No, but the FREE PPTools Starter Set Pick Up and Place Exactly tool

http://www.rdpslides.com/pptools/FAQ00095.htm#Pickup

will let you resize the picture to full slide size with one click.

b. After inserting a picture using a "file link", changing the file link
to another file?


There's some VBA code for this he

Show me the link and let me edit it
http://www.rdpslides.com/pptfaq/FAQ00433.htm

There's also an inexpensive upgrade to the free starter set that includes a
kind of "shape inspector" that lets you edit shape names, links, tags and such.

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================

  #4  
Old May 24th, 2004, 03:28 PM
Troy @ TLC
external usenet poster
 
Posts: n/a
Default Importing and scaling images

In addition to the above suggestions you can use PowerTools IMPORT/EXPORT
toolset. It will allow you to mass import and size images easily (above
suggestions work perfect as well). But its Multiple Picture Importer tools
is a gem. It creates a virtual link to the original photo so you can update
images in your presentation at any time and keep all of the attributes.
You'll have to try it to really understand it...
http://corpimaging.com/PowerTools/pt-im-ex.htm

--
Best Regards,
Troy Chollar
===========================================
TLC Creative Services, Inc. 760-639-1853 office
www.tlccreative.com 760-806-1853 fax
760-521-7401 cell
===========================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA
www.PowerPointLive.com
===========================================


"Colin Wilson" wrote in message
...
Is there a way in Powerpoint to:

a. Make a picture scale automatically to the page size when importing
(i.e. not having to drag a larger image to a smaller size using the
handles), and/or

b. After inserting a picture using a "file link", changing the file link
to another file?

I'm looking for a way of inserting a large number of pictures so each
one exactly fits separate slides. The PP presentation size is normal
screen res of 1024 x 768, but the pictures are 2560 x 1924. Individually
scaling each picture is literally a "real drag"!

--
Thanks
Colin Wilson



  #5  
Old May 28th, 2004, 07:56 PM
Dennis Kuhn
external usenet poster
 
Posts: n/a
Default Importing and scaling images

I'm currently working on a similar project. My wife, a photographer,
wants to take pictures at the wedding, then download select shots from
her digital camera cards to a laptop so she can quickly import them
into a Powerpoint presentation that loops during the reception.

Most of this VBA code I got from the PowerPoint FAQ List website.
I've added a bit to fix a couple of bugs I encounted when I just
copied & pasted the code. It's hard-coded to get JPGs from a specific
directory right now, but here's what I have so far:

Sub Import_JPGs_As_Slides()

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

' Need to add a user interface here, and ask for the path, maybe
even have
' the user browse to the appropriate folder.
' Ex. on a PC: "C:\My Pictures\Flowers\*.PNG"

strFileSpec = "C:\testpics\*.jpg"

strTemp = Dir(strFileSpec)
SlideNum = 2

Do While strTemp ""
Set oSld = ActivePresentation.Slides.Add _
(ActivePresentation.Slides.Count + 1, ppLayoutBlank)

' Select the last slide in the presentation
' (using the count of slides as the number reference)
' This can allow for multiple folders to be imported into one
show
ActivePresentation.Slides(ActivePresentation.Slide s.Count).Select

' Extract just the path before the * wildcard symbol...
strFN = ""
For i = 1 To Len(strFileSpec)
If Mid$(strFileSpec, i, 1) = "*" Then
Exit For
End If
strFN = strFN & Mid$(strFileSpec, i, 1)
Next i
' Then add the current filename to that path.
strFN = strFN & strTemp

' Add the picture to the slide
Set oPic = ActiveWindow.Selection.SlideRange.Shapes.AddPictur e
_
(FileName:=strFN, _
LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, _
Left:=0, Top:=0, Width:=100, Height:=100)

' Reset it to its "real" size and make it fill the slide
With oPic
.ScaleHeight 1, msoTrue
.ScaleWidth 1, msoTrue
.Height = ActivePresentation.PageSetup.SlideHeight
.Width = ActivePresentation.PageSetup.SlideWidth
End With

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

End Sub



Hope this helps!

Dennis
  #6  
Old May 29th, 2004, 03:49 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default Importing and scaling images



Most of this VBA code I got from the PowerPoint FAQ List website.
I've added a bit to fix a couple of bugs I encounted when I just
copied & pasted the code.


If you recall the problems you ran into, I'd like to know about them, whether
it was with the code on the site or the way it was explained. I'd like to
spare others the same problems. Thanks. Here or by email at steve @ pptools
dot com is fine.

It's hard-coded to get JPGs from a specific
directory right now, but here's what I have so far:

Sub Import_JPGs_As_Slides()

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

' Need to add a user interface here, and ask for the path, maybe
even have
' the user browse to the appropriate folder.
' Ex. on a PC: "C:\My Pictures\Flowers\*.PNG"

strFileSpec = "C:\testpics\*.jpg"

strTemp = Dir(strFileSpec)
SlideNum = 2

Do While strTemp ""
Set oSld = ActivePresentation.Slides.Add _
(ActivePresentation.Slides.Count + 1, ppLayoutBlank)

' Select the last slide in the presentation
' (using the count of slides as the number reference)
' This can allow for multiple folders to be imported into one
show
ActivePresentation.Slides(ActivePresentation.Slide s.Count).Select

' Extract just the path before the * wildcard symbol...
strFN = ""
For i = 1 To Len(strFileSpec)
If Mid$(strFileSpec, i, 1) = "*" Then
Exit For
End If
strFN = strFN & Mid$(strFileSpec, i, 1)
Next i
' Then add the current filename to that path.
strFN = strFN & strTemp

' Add the picture to the slide
Set oPic = ActiveWindow.Selection.SlideRange.Shapes.AddPictur e
_
(FileName:=strFN, _
LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, _
Left:=0, Top:=0, Width:=100, Height:=100)

' Reset it to its "real" size and make it fill the slide
With oPic
.ScaleHeight 1, msoTrue
.ScaleWidth 1, msoTrue
.Height = ActivePresentation.PageSetup.SlideHeight
.Width = ActivePresentation.PageSetup.SlideWidth
End With

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

End Sub

Hope this helps!

Dennis


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================

  #7  
Old June 1st, 2004, 08:44 PM
Dennis Kuhn
external usenet poster
 
Posts: n/a
Default Importing and scaling images

Steve Rindsberg wrote in message ...

Most of this VBA code I got from the PowerPoint FAQ List website.
I've added a bit to fix a couple of bugs I encounted when I just
copied & pasted the code.


If you recall the problems you ran into, I'd like to know about them, whether
it was with the code on the site or the way it was explained. I'd like to
spare others the same problems. Thanks.



Cool. [grinning and handing out grains of salt, just in case]

Off the top of my head, the biggest problem was with getting the
actual file. I actually had some notes to work off of for this:

Here's the original code:

Set oPic = ActiveWindow.Selection.SlideRange.Shapes.AddPictur e _
(FileName:=strFileSpec, LinkToFile:=msoFalse,
SaveWithDocument:=msoTrue, _
Left:=0, Top:=0, Width:=100, Height:=100)

This generated a run-time error: "Selection (unknown member): Invalid
request. Nothing appropriate is currently selected."

At this point, the strFileSpec variable is the path and wildcard (i.e.
"c:\testpics\*.jpg"), which I figured was too vague. So, I added code
to remove the wildcard part of the string ("*.jpg") and replace it
with the unique filename that changes with each iteration of the loop.
(See my previous post for the pertinent code. I tried to document it
well enough to be self-explanatory.)

....Looking at the code myself, I'm seeing that I'm re-stripping the
wildcard code WITHIN the loop, which is unnecessary. I shoulda put
that before the loop instead. Still coding, of course. I'm still
at a point where I'm trying to get each planned step to WORK. I'll
optimize later.


I also included code to place the name of the file at the bottom of
the slide. To make this easier, I added a slide number variable
(SlideNum) so I could more easily identify and add a textbox to the
correct slide. Without this variable, I was having a devil of a time
coming up with the correct syntax for "on the slide I just worked on,
darn it!"

'Add filename to slide in a text box
'(as wide as a slide, centered at the bottom)
Set ThisSlide = ActivePresentation.Slides(SlideNum)
Set FilenameBox = ThisSlide.Shapes.AddTextbox(msoTextOrientationHori zontal,
_
12, 502, 700, 50)

With FilenameBox
.TextFrame.TextRange.Text = strTemp
.TextFrame.TextRange.Font.Color.SchemeColor = ppForeground
.TextFrame.TextRange.Paragraphs(Start:=1, _
Length:=1).ParagraphFormat.Alignment = ppAlignCenter
.TextFrame.TextRange.Font.Name = "Courier New"
.TextFrame.TextRange.Font.Bold = True
End With


Just in case anyone's wondering: My changes to the original code from
the PPT FAQ are not copyrighted in any way. I'm posting them here so
anyone can use them. VBA is hard enough to work with in Excel or
Access... but it's been a downright pain in my butt with Powerpoint.
If I can alleviate just one person's similar pain... I've accomplished
something good.

Dennis
  #8  
Old June 2nd, 2004, 04:21 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default Importing and scaling images

Thanks, Dennis.

I've made a few changes to the code on the FAQ based on your suggestions.

....Looking at the code myself, I'm seeing that I'm re-stripping the
wildcard code WITHIN the loop, which is unnecessary. I shoulda put
that before the loop instead. Still coding, of course. I'm still
at a point where I'm trying to get each planned step to WORK. I'll
optimize later.


With what's up there now, you won't have to strip off the wildcard, it gives you the
path and the filename independently now:

Batch Insert a folder full of pictures, one per slide
http://www.rdpslides.com/pptfaq/FAQ00352.htm

I also included code to place the name of the file at the bottom of
the slide. To make this easier, I added a slide number variable
(SlideNum) so I could more easily identify and add a textbox to the
correct slide. Without this variable, I was having a devil of a time
coming up with the correct syntax for "on the slide I just worked on,
darn it!"


The new version should help with that too:

oSld.SlideIndex or oSld.SlideNumber depending on which you're after.

Just in case anyone's wondering: My changes to the original code from
the PPT FAQ are not copyrighted in any way. I'm posting them here so
anyone can use them. VBA is hard enough to work with in Excel or
Access... but it's been a downright pain in my butt with Powerpoint.
If I can alleviate just one person's similar pain... I've accomplished
something good.


You have! Thanks!

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================

 




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


All times are GMT +1. The time now is 01:37 AM.


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