M
Mike Clayton
Hi,
I've got a VBA macro that performs actions on various InlineShape objects in
a Word document. I want to be able to determine whether or not a particular
InlineShape object is embedded inside a TextBox, but I can't see anything in
the object model that could help me do this.
I've tried <inlineshapeobject>.Parent, but this returns a reference to the
document, rather than the containing TextBox.
What I'm after is something like:
Public Sub ProcessInlineShape(value as Word.InlineShape)
Dim blnIsInsideTextBox as Boolean
' determine if the shape is inside a textbox
... mystery code goes here ...
' act based on the result
If blnIsInsideTextBox Then
' do something
Else
' do something else
End If
End Sub
Any help would be appreciated.
Regards,
Mike
I've got a VBA macro that performs actions on various InlineShape objects in
a Word document. I want to be able to determine whether or not a particular
InlineShape object is embedded inside a TextBox, but I can't see anything in
the object model that could help me do this.
I've tried <inlineshapeobject>.Parent, but this returns a reference to the
document, rather than the containing TextBox.
What I'm after is something like:
Public Sub ProcessInlineShape(value as Word.InlineShape)
Dim blnIsInsideTextBox as Boolean
' determine if the shape is inside a textbox
... mystery code goes here ...
' act based on the result
If blnIsInsideTextBox Then
' do something
Else
' do something else
End If
End Sub
Any help would be appreciated.
Regards,
Mike