Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    In Line Wrapping with macro (2003)

    I am trying to write a macro that formats pictures with In Line wrapping style. When I try to record a macro, the In Line option is always grayed out in the Format Pictures dialogue box.

    I have been experimenting with macros, but without success. I am basing them on this:

    application.options.PictureWrapType = wdWrapMergeInline

    or

    Selection.ShapeRange.WrapFormat.Type = wdWrapMergeInline

    Any suggestions?

    We get documents with lots of pictures. Could a macro do this in a loop?

    Could a macro also do the same with Microsoft objects like graphs from Excel?

    Thanks for your help!

    Cheers, Bill

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: In Line Wrapping with macro (2003)

    You want something like this...
    <code>
    Sub ShapesToInline()
    Dim shp As Shape

    For Each shp In ActiveDocument.Shapes
    If shp.Type = msoPicture Then
    shp.ConvertToInlineShape
    End If
    Next shp

    End Sub
    </code>

    StuartR

  3. #3
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: In Line Wrapping with macro (2003)

    Hey Stuart,

    It works like a charm!

    It will take me a lot more study to get to the point where I can figure something like this out myself.

    Thanks a million!

    Cheers, Bill

Posting Permissions

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