Convert Inline to Shape and Anchor Shape 
Author Message
 Convert Inline to Shape and Anchor Shape

I'm writing what I hoped would be a simple macro to
convert an inserted inline shape to a floating shape,
without the image jumping to some other part of the page.
Of course, graphics are notoriouslyly jumpy in Word,
anyway. But, here is what I have:

if selection.type=wdSelectionInlineShape then
  Selection.InlineShapes(1).ConvertToShape.LockAnchor=True
end if

This works, but the darned image still inconsistently
moves around. Does anybody know a good way to stabilize
it?

George



Sat, 22 May 2004 00:18:53 GMT  
 Convert Inline to Shape and Anchor Shape
Well, we've come up with the following solution. It seems
to work pretty consistently. The picture stays in place.
If anybody has another approach, it would be nice to see
it. Otherwise, I think we'll run with this.

Dim x As Integer, y As Integer
x = 1
y = 1
Selection.Bookmarks.Add Name:="CurShape"
While y <> 0
    If ActiveDocument.InlineShapes(x). _
    Range.Bookmarks.Exists("CurShape") Then
        y = 0
    Else
        x = x + 1
    End If
Wend
Selection.Bookmarks.Item("CurShape").Delete
Selection.MoveUp unit:=wdLine, Count:=1
ActiveDocument.InlineShapes(x).ConvertToShape. _
   LockAnchor = True

George

Quote:
>-----Original Message-----
>I'm writing what I hoped would be a simple macro to
>convert an inserted inline shape to a floating shape,
>without the image jumping to some other part of the
page.
>Of course, graphics are notoriouslyly jumpy in Word,
>anyway. But, here is what I have:

>if selection.type=wdSelectionInlineShape then
>  Selection.InlineShapes

(1).ConvertToShape.LockAnchor=True
Quote:
>end if

>This works, but the darned image still inconsistently
>moves around. Does anybody know a good way to stabilize
>it?

>George

>.



Sat, 22 May 2004 00:54:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. grouping shapes and convert to inline shape

2. Converting Inline shape to floating graphics?

3. Dynamically convert shapes to Process Engineering shapes

4. Shapes shapes shapes

5. To distinguish between floating shapes anchored at same paragraph by bookmarks

6. Anchor for shapes

7. Changing the anchor point of a shape in code

8. Locating Anchor of a Shape

9. Q:Replace inline shape with text in word doc

10. Modify an Inline shape

11. Recorded code to shadow inline shape fails

12. Adding text into an Inline Shape

 

 
Powered by phpBB® Forum Software