Consulting

Results 1 to 2 of 2

Thread: Quick way to apply size and position to Object?

  1. #1
    VBAX Newbie
    Joined
    Aug 2012
    Posts
    1
    Location

    Quick way to apply size and position to Object?

    Hello everyone,

    Maybe there is a quick way to do this with PowerPoint functions, but I assume VBA is necessary. I am cutting and pasting a chunk of spreadsheet to a slide as Microsoft Object. For each of these, I have to manually apply a new size and position to ensure it fits on each slide correctly in the area provided. Is there a way to do this with PowerPoint already, or has anyone seen a piece of code to do this?

    Thanks!

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Straight after the Paste (while still selected)

    [VBA]Sub Move_Size()
    With ActiveWindow.Selection.ShapeRange(1)
    .LockAspectRatio = True
    .Top = in2Points(1) '1 inch from top
    .Left = in2Points(1) '1 inch from left
    .Width = in2Points(4) '4 inches wide
    End With
    End Sub

    Function in2Points(inVal As Single)
    in2Points = inVal * 72
    End Function
    [/VBA]
    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
  •