I am writing a vb.net
desktop application which automates ms-word
. Defining variables of types taken from the word object model, I cannot access member elements of those classes in immediate mode, when debugging. I CAN access them from my code, when it is running.
Private Sub BlackOut(aRange As Word.Range, CharLimit As Integer)
MsgBox(aRange.Characters.Count) 'This works
End Sub
Running the Code and accessing aRange.Characters.Count
works just fine. When setting a breakpoint and typing the line ? aRance.Characters.Count
in the Immediate Window, however, I get the error message:
error BC30456: 'Characters' is not a member of 'Range'.
Strangely, typing ? aRange.Text
works in the Immediate Window.
I haven't encountered that before. Can anyone help me out of this?