• Format Picture macro (Word 2002 SP3)

    Author
    Topic
    #415709

    Hi All

    It would be very useful to have a macro to do some simple formatting of pictures I am regularly inserting into documents. I tried to record such a macro, but failed miserably because the Layout tab was greyed out and specific size information was saved instead of percentage information.

    What I need this macro to do, once I have clicked on the picture, is:

    1. Re-size the picture to 80% relative to the picture size (with lock aspect ratio ticked)
    2. Wrapping style = Tight
    3. Horizontal alignment = Center

    I would be very grateful if someone more clever than me could help.

    Viewing 0 reply threads
    Author
    Replies
    • #927760

      Try this:

      Sub FormatPicture()
      If Selection.Type = wdSelectionInlineShape Then
      Selection.InlineShapes(1).ConvertToShape
      ElseIf Not (Selection.Type = wdSelectionShape) Then
      MsgBox “Please select a picture!”, vbExclamation
      Exit Sub
      End If
      With Selection.ShapeRange
      .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
      .Left = wdShapeCenter
      .WrapFormat.Type = wdWrapTight
      .LockAspectRatio = msoTrue
      .ScaleHeight 0.8, msoTrue
      .ScaleHeight 0.8, msoTrue
      End With
      End Sub

    Viewing 0 reply threads
    Reply To: Format Picture macro (Word 2002 SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: