Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am inserting objects, mostly PDF pages, into a Word 2K7 document. I am wasting a lot of time formating the object to set "Layout" to "In line with text"; unchecking the boxes for "Local aspect ratio" and "Relative to original picture size; and setting the "Size" to "Absolute Height" of 7 inches and "Absolute Width" of 6 inches. Would appreciate very much any guidance that would create a macro for this purpose. Thanks!!!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The following will convert *all* shapes in the active document to inline shapes and resize them.
    I tested it in Word 2003, I don't have Word 2007.

    Code:
    Sub ConvertAndResizeAll()
      Dim shp As Shape
      For Each shp In ActiveDocument.Shapes
    	With shp
    	  .LockAspectRatio = False
    	  .Height = Application.InchesToPoints(7)
    	  .Width = Application.InchesToPoints(6)
    	  .ConvertToInlineShape
    	End With
      Next shp
    End Sub

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If you want to apply the macro to the currently selected shape only, use this version:

    Code:
    Sub ConvertAndResize()
      With Selection.ShapeRange
    	.LockAspectRatio = msoFalse
    	.Height = Application.InchesToPoints(7)
    	.Width = Application.InchesToPoints(6)
    	.ConvertToInlineShape
      End With
    End Sub

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hans, as always, you guys deliver. Will use both. Thanks!!!

Posting Permissions

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