+ Reply to Thread
Results 1 to 3 of 3

Resizing an image to a % value

  1. #1
    Registered User
    Join Date
    04-13-2005
    Posts
    8

    Resizing an image to a % value

    It would appear that I cant actually resize an image to a % value. Below is a macro I recorded, would it be possible to set it to a % value, possibly by gaining the initial width and then working out the % from the final width so that I can apply a similar scale to other images?

    Please Login or Register  to view this content.
    Thanks for any help.

    Taff

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Taff,

    Here is some information on the Scale Height/Width Method that should help you.

    Scale Height/Width Method
    Scales the height or width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current height.

    Syntax

    expression.ScaleHeight(Factor, RelativeToOriginalSize, fScale)
    expression.ScaleWidth(Factor, RelativeToOriginalSize, fScale)


    expression Required. An expression that returns a Shape or ShapeRange object.

    Factor Required Single. Specifies the ratio between the height of the shape after you resize it and the current or original height. For example, to make a rectangle 50 percent larger, specify 1.5 for this argument.

    RelativeToOriginalSize Required Long. True to scale the shape relative to its original size. False to scale it relative to its current size. You can specify True for this argument only if the specified shape is a picture or an OLE object.

    fScale Optional Long. Specifies which part of the shape retains its position when the shape is scaled. Can be one of the following MsoScaleFrom constants: msoScaleFromBottomRight, msoScaleFromMiddle, or msoScaleFromTopLeft. The default value is msoScaleFromTopLeft.

    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 04-19-2005 at 12:55 PM.

  3. #3
    Registered User
    Join Date
    04-13-2005
    Posts
    8
    Leith,

    looks like you've saved me again, thats a lot better than my complicated solution.

    Cheers,

    Taff

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1