Results 1 to 2 of 2
2002-03-15, 00:44 #1
- Join Date
- Mar 2002
- 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
Set oRange = Selection.Range
oRange.Style = "Figure Holder"
oRange.ShapeRange.WrapFormat.Type = wdWrapInline
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.
2002-03-15, 02:12 #2
- Join Date
- Dec 2000
- New York, NY
- Thanked 29 Times in 27 Posts
Re: Applying WrapFormat to objects (Word XP)
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.