Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Applying WrapFormat to objects (Word XP)

    I'm writing a routine that goes to each shape (i.e., picture) in a document and applies the wrap format "in line with text" only it doesn't work. I can change the wrap format to tight or behind but not to line with text. I can't find anything in the KB about this...does anyone know anything about it? Here's my code:

    Dim oRange As Range
    For n = 1 To ActiveDocument.Shapes.Count
    ActiveDocument.Shapes(n).Select
    Set oRange = Selection.Range
    oRange.Style = "Figure Holder"
    oRange.ShapeRange.WrapFormat.Type = wdWrapInline
    Next n

    FWIW, I've tried using Selection.ShapeRange and Activedocument.shapes(n) to access the particular shape individually but it just will not change the layout with the wdWrapInLine argument..any other argument works.

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Applying WrapFormat to objects (Word XP)

    SF,

    I don't have XP and haven't worked with this particular feature, but it sounds like you want to use the ConvertToInlineShape method - check out the Word VBA help for this.

    Gary

Posting Permissions

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