Browsing InlineShapes causes Word to Crash
Does anybody have any experience with using the VBA Editor and opening an InlineShape using the locals window at a breakpoint in the code.
I have generated a small test routine:
VB Code:
Public Sub Test()
Dim D As Variant
Dim S As Variant
Dim Sh As Variant
Set D = Application.ActiveDocument
Set S = Application.Selection
If S.InlineShapes.Count > 0 Then
Set Sh = S.InlineShapes(1)
If Sh.Type = wdInlineShapePicture Then
MsgBox "Picture"
End If
End If
' the actual Application object can be reach of any of the two above
Stop
End Sub
I get no errors accessing properties of the InlineShape (Sh) thru code, but if i try to open the shape (item 1 of InlineShapes) in the locals windows when the code reaches the breakpoint, word crashes and restarts.
By the way I am running this code while I have a graphics image in the header selected, i.e. the InlineShape.
Is there another way to access the shape, or is this a bug in Word (VBA)?
Thanks
:-)an