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:
  1. Public Sub Test()
  2.     Dim D As Variant
  3.     Dim S As Variant
  4.     Dim Sh As Variant
  5.     Set D = Application.ActiveDocument
  6.     Set S = Application.Selection
  7.     If S.InlineShapes.Count > 0 Then
  8.         Set Sh = S.InlineShapes(1)
  9.         If Sh.Type = wdInlineShapePicture Then
  10.             MsgBox "Picture"
  11.         End If
  12.     End If
  13.     ' the actual Application object can be reach of any of the two above
  14.     Stop
  15.    
  16. 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