Consulting

Results 1 to 2 of 2

Thread: Crop image to 16:9 ratio

  1. #1
    VBAX Newbie
    Joined
    Nov 2020
    Posts
    3
    Location

    Crop image to 16:9 ratio

    Hello everyone,

    I would like to create a macro to crop the selected image to 16:9 ratio (as we can do in crop / aspect ratio / 16:9)
    Then put my image aligned top, left
    Then resize it to my slide settings (here 32 cm*18 cm = 16/9)

    I guess the code should look like something like this but I don't get which values I should have for the pictureFormat.Crop



    Sub Resize()
    With ActiveWindow.Selection.ShapeRange


    .PictureFormat.CropLeft = ?
    .PictureFormat.CropTop = ?
    .PictureFormat.CropRight = ?
    .PictureFormat.CropBottom = ?

    .Height = 18 * 28.346
    .Width = 32 * 28.346
    .Left = 0 * 28.346
    .Top = 0 * 28.346


    End With
    End Sub

    Thank you very much,

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    1,940
    Location
    This is cross posted. There are answers here
    https://answers.microsoft.com/en-us/...4-b8188c8e680e
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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