REsize image powerpoint 2007

  • Thread starter Thread starter Desmond
  • Start date Start date
D

Desmond

Hi. I am not very good at ppt but can someone tell me if there is an
effect to re-size an image. What I would like to do is have a page
that shrinks the image to the top left corner and then displays text.
I know there are lots of special effects for images.

Desmnd.
 
If you mean start with an image of some sort, then zoom in to a part of it,
see my thread here called "zoom in and move to a spot at the same time",
started on 11/13.

The bottom line is yes, you can. Select your object, then see "animations /
custom animation / add effect / emphasis (and/or) motion paths". Play
around and have fun. Note: use a hi-res image, so it'll still look good
after you zoom in. Also, there are less elaborate ways to approximate this
effect than how I did it.

Steve
 
If you mean start with an image of some sort, then zoom in to a part of it,
see my thread here called "zoom in and move to a spot at the same time",
started on 11/13.

The bottom line is yes, you can.  Select your object, then see "animations /
custom animation / add effect / emphasis (and/or) motion paths".  Play
around and have fun.  Note: use a hi-res image, so it'll still look good
after you zoom in.  Also, there are less elaborate ways to approximate this
effect than how I did it.

Steve







- Show quoted text -

Sorry I cant find the effect I want. The only animations available are
Fade smoothly
Fade through black
cut
cut through back
Disolve
Wipe down
Wipe left

Can this be done in VB Script. I have used VBS before in Word and
Excel.
Maybe top, left, height and width properties.

Desmond.
 
Hi,
Select your image, go to custom animations, click on emphasis (yellow star),
go to grow/shrink, select smaller or put in the percentages in which you
want to grow/shrink.

Click on Add Effect > Motions path > Draw Custom Path > Line
Now hold the left mouse key and drag a line from the middle of the image to
the upper left corner (so that the image fits to it)
Go into the animation of this object and select with previous.

This works as well in 2003 as 2007 and it's done within 1 minute ;)

Take Care,

Martin
 
Desmond said:
- Show quoted text -

Sorry I cant find the effect I want. The only animations available are
Fade smoothly
Fade through black
cut
cut through back
Disolve
Wipe down
Wipe left

Can this be done in VB Script. I have used VBS before in Word and
Excel.
Maybe top, left, height and width properties.

Desmond.

</quoted text>

You are looking at transitions, which move you from slide-to-slide.

For Animations, click the Custom Animations button, select an object and
click the Add Animation button.
 
- Show quoted text -

Sorry I cant find the effect I want. The only animations available are
Fade smoothly
Fade through black
cut
cut through back
Disolve
Wipe down
Wipe left

Can this be done in VB Script. I have used VBS before in Word and
Excel.
Maybe top, left, height and width properties.

Desmond.

</quoted text>

You are looking at transitions, which move you from slide-to-slide.

For Animations, click the Custom Animations button, select an object and
click the Add Animation button.

--
Echo [MS PPT MVP]http://www.echosvoice.com
What's new in PPT 2007?http://www.echosvoice.com/2007.htm
Fixing PowerPoint Annoyanceshttp://tinyurl.com/36grcd
PowerPoint 2007 Complete Makeover Kithttp://tinyurl.com/32a7nx

No this is not right. First it defaults to 150% and can't be changed.
Secondly it shrinks pre-portionaly. What I want is in VB terms
left position 10 pixels top 10pixels. Width 300px height 300px.
NOW
shrink height and with so that the image is anchored to the top
corner. The image will shrink up and right with the top corner fixed.
This should be done in VB script. Also when I used Office 97. There
was a macro recorder that allowed you to make changes and see the code
that would be needed to do this.

Desmond.
 
Sorry I cant find the effect I want. The only animations available are
Fade smoothly
Fade through black
cut
cut through back
Disolve
Wipe down
Wipe left
Can this be done in VB Script. I have used VBS before in Word and
Excel.
Maybe top, left, height and width properties.

</quoted text>
You are looking at transitions, which move you from slide-to-slide.
For Animations, click the Custom Animations button, select an object and
click the Add Animation button.
--
Echo [MS PPT MVP]http://www.echosvoice.com
What's new in PPT 2007?http://www.echosvoice.com/2007.htm
Fixing PowerPoint Annoyanceshttp://tinyurl.com/36grcd
PowerPoint 2007 Complete Makeover Kithttp://tinyurl.com/32a7nx

No this is not right. First it defaults to 150% and can't be changed.
Secondly it shrinks pre-portionaly. What I want is in VB terms
left position 10 pixels top 10pixels. Width 300px  height 300px.
NOW
shrink height and with so that the image is anchored to the top
corner. The image will shrink up and right with the top corner fixed.
This should be done in VB script. Also when I used Office 97. There
was a macro recorder that allowed you to make changes and see the code
that would be needed to do this.

Desmond.- Hide quoted text -

- Show quoted text -

What i Need is a VB script person to allow re-sizing in code. I have
found out how to get the developer tab.

The following cannot be saved in macro-free presentations
To save a file with these features, click No to return to the save as
dialog box, and then choose a macro-enabled file type in the file type
list

What file type AND what file type list?
 
Sorry I cant find the effect I want. The only animations available are
Fade smoothly
Fade through black
cut
cut through back
Disolve
Wipe down
Wipe left
Can this be done in VB Script. I have used VBS before in Word and
Excel.
Maybe top, left, height and width properties.

</quoted text>
You are looking at transitions, which move you from slide-to-slide.
For Animations, click the Custom Animations button, select an object and
click the Add Animation button.
--
Echo [MS PPT MVP]http://www.echosvoice.com
What's new in PPT 2007?http://www.echosvoice.com/2007.htm
Fixing PowerPoint Annoyanceshttp://tinyurl.com/36grcd
PowerPoint 2007 Complete Makeover Kithttp://tinyurl.com/32a7nx

No this is not right. First it defaults to 150% and can't be changed.
Secondly it shrinks pre-portionaly. What I want is in VB terms
left position 10 pixels top 10pixels. Width 300px  height 300px.
NOW
shrink height and with so that the image is anchored to the top
corner. The image will shrink up and right with the top corner fixed.
This should be done in VB script. Also when I used Office 97. There
was a macro recorder that allowed you to make changes and see the code
that would be needed to do this.

Desmond.- Hide quoted text -

- Show quoted text -

Sub move()
Picture1.jpg.Height = 100
End Sub

There is a 1 day time zone between me and the rest of the group. So I
will have to do this very slowly.
 
PowerPoint doesn't work in pixels; it uses points (72/inch).

Dim oSh as Shape
Set oSh = ActivePresentation.Slides(x).Shapes("shapename")
' substitute the correct slide number and shape name above

With oSh
  .Left = 10
  .Top = 10
  .Width = 300
  .Height = 300
End With

If you want to change the size but leave the top right corner fixed,

Dim sngRight as Single
sngRight = oSh.Left + oSh.Width
'Change the height/width
' then
oSh.Left = sngRight - osh.Width



In the Save As dialog box, beneath the File name text box, there's a "Save as
type" list box.  Use it to choose "PowerPoint Macro-Enabled Presentation
(*.PPTM)"

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/

The problem I am having is I have put a picture on a slide. If the
picture is pic123.jpg. Then I assume that I would say something like
pic123.jpg.height = x;
This is an obcect orientated problem. Do I have to put a picture
control on the slide and set the picture to it.

I have done years of programming in visual basic and I would use a
picture control. Can you send me simple instructions on how to do this
from getting a picture onto the form. I have managed to save the file
as a pptm. set powerpoint options to Enable all macros.


Desmond
 
No, you can manipulate the shape that represents the picture directly.
Use Insert, Picture, From File to insert it.

Look again at the code fragment I typed earlier:

Dim oSh as Shape
' Create a variable to hold a reference
' to a shape object

Set oSh = ActivePresentation.Slides(x).Shapes("shapename")
' create the reference to a specific shape
' You'd want to change shapename to whatever the name of your
' picture shape is.  The filename isn't relevant.

To see the shape name assigned by PPT by selecting it then running this in
the immediate window of the IDE:

? ActiveWindow.Selection.ShapeRange(1).Name


You said above that you had a picture on a SLIDE, not a form.
Which is it?

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/- Hide quoted text -

- Show quoted text -

No this does not work. I put a picture into slide 8 and there is an
error in your code
Set oSh = ActivePresentation.Slides(8).Shapes("WaterWine.jpg")
ERROR: Item WaterWine.jpg not found in the shapes collection.

That is correct it is a picture it ios a .jpg. it is not a Shape
althought it is a rectangular type of picture.

I have a picture on slide 8. WaterWine.jpg. I need code to change it's
height and width. It is not a shape. Shapes are stars, circles and
squigly lines.
 
No, you can manipulate the shape that represents the picture directly.
Use Insert, Picture, From File to insert it.

Look again at the code fragment I typed earlier:

Dim oSh as Shape
' Create a variable to hold a reference
' to a shape object

Set oSh = ActivePresentation.Slides(x).Shapes("shapename")
' create the reference to a specific shape
' You'd want to change shapename to whatever the name of your
' picture shape is.  The filename isn't relevant.

To see the shape name assigned by PPT by selecting it then running this in
the immediate window of the IDE:

? ActiveWindow.Selection.ShapeRange(1).Name


You said above that you had a picture on a SLIDE, not a form.
Which is it?

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/- Hide quoted text -

- Show quoted text -

Don't understand any of this
' You'd want to change shapename to whatever the name of your
' picture shape is. The filename isn't relevant.

The file name is WaterWine.jpg. What the Shape name is god knows What
is a shape. I did not put a shape on the slide I put a genuine .JPG
(Joint Photographic Experts Group) on the slide.What is a shape what
is a shape name.
 
Don't understand any of this
' You'd want to change shapename to whatever the name of your
' picture shape is.  The filename isn't relevant.

The file name is WaterWine.jpg. What the Shape name is god knows What
is a shape. I did not put a shape on the slide I put a genuine .JPG
(Joint Photographic Experts Group) on the slide.What is a shape what
is a shape name.- Hide quoted text -

- Show quoted text -

This is strange

sngRight = oSh.Left + oSh.Width
'Change the height/width
' then
oSh.Left = sngRight - oSh.Width

Dont you mean

oSh.Width = oSh.Width * .5
oSh.Height = oSh.Height * .5

Surley that is what I do to change the size of this mysterious shape
that I don't know what it is as I am a beginner to this
And that goes for the mysterious collection object that I don't know
anything about.

Does this shape object have to act as a container for the picture. If
so should I not have to add a shape to the slide(8) and set the
picture to it.? What part of I do not know what this shape object is
does nobody here understand.
 
No, you can manipulate the shape that represents the picture directly.
Use Insert, Picture, From File to insert it.

Look again at the code fragment I typed earlier:

Dim oSh as Shape
' Create a variable to hold a reference
' to a shape object

Set oSh = ActivePresentation.Slides(x).Shapes("shapename")
' create the reference to a specific shape
' You'd want to change shapename to whatever the name of your
' picture shape is.  The filename isn't relevant.

To see the shape name assigned by PPT by selecting it then running this in
the immediate window of the IDE:

? ActiveWindow.Selection.ShapeRange(1).Name


You said above that you had a picture on a SLIDE, not a form.
Which is it?

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/- Hide quoted text -

- Show quoted text -

Print ActiveWindow.Selection.ShapeRange(1).Name
ERROR: Method not valid without suitable object
 
This is strange

sngRight = oSh.Left + oSh.Width
'Change the height/width
' then
oSh.Left = sngRight - oSh.Width

Dont you mean

oSh.Width = oSh.Width * .5
oSh.Height = oSh.Height * .5

Surley that is what I do to change the size of this mysterious shape
that I don't know what it is as I am a beginner to this
And that goes for the mysterious collection object that I don't know
anything about.

Does this shape object have to act as a container for the picture. If
so should I not have to add a shape to the slide(8) and set the
picture to it.? What part of I do not know what this shape object is
does nobody here understand.

OK, after responding, I just found the rest of this thread. I didn't realize
that you had been banging this around with Steve. Here are some basics, but
you might want to look into a reference about all of this to get some basic
background (see my book and/or the Programming PowerPoint section of
http://www.pptfaq.com/).

Each slide consists of a Shapes collection. All the stuff (pictures, lines,
text boxes, circles, etc.) are part of the Shapes collection. You access the
Shapes collection of a particular slide, e.g. slide 8, with:

ActivePresentation.Slides(8).Shapes

If you want to access a specific shape, you can do it by number or name. For
example, if you want to access the 4th shape on the 8th slide, you need:

ActivePresentation.Slides(8).Shapes(4)

The problem is that you have no easy way of telling which shape is which.
The other problem is that the shape numbers can change (e.g., delete shape 3
and all the shapes with higher numbers move down so the old number 4 is now
number 3). That is why it tends to be better to use shape names.

Shape names are names that PowerPoint uses for the shapes. They have nothing
to do with the file names from where a picture comes. By default, PowerPoint
assigns a name to a shape when it gets inserted onto a slide (it usually
looks something like "AutoShape 2" or "Picture 5"). So, if you know the name
of the picture is Picture 5, you can change the above line to:

ActivePresentation.Slides(8).Shapes("Picture 5")

But you won't easily know what the name of the picture is. That is why you
probably want to change the name. In my earlier post, I suggested using the
code on my site in Example 8.7. Now, you can change the name of that picture
to whatever you want. Change it My Mother, and your code should be:

ActivePresentation.Slides(8).Shapes("My Mother")

That would be the pointer to the shape/picture that you want to manipulate.
Steve had suggested putting this into a variable so your code doesn't fill
up with references to

ActivePresentation.Slides(8).Shapes("My Mother")

Instead, just make a variable that points to the shape:

Set oSh = ActivePresentation.Slides(8).Shapes("My Mother")

Now, in your macro, whenever you want to refer to the picture, just use oSh
instead.

So, now that we have a nice shorthand for the picture, you can adjust the
properties of the picture, such as its Top, Left, Width, and Height
properties.

oSh.Top = 0

Moves the picture to the top of the slide.

oSh.Width = 50

makes the picture 50 pixels wide (and probably auto-adjusts the height,
depending on the value of another property that I can't remember off the top
of my head).

Something like:

oSh.Width = oSh.Width * .5

should cut the width of the picture in half (and possibly the height).

This should be enough to allow you to play with various settings to adjust
the location and size of your picture. Once you have the macro written,
assign it to a button, run the presentation in Slide Show view and click on
the button to watch your picture change. You might want another macro that
puts the picture back the way it was to start, also.

--David

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Back
Top