0
表内要确定形状是Table
,你可以使用下面的代码中:确定是否形状是使用基于索引的参考
ActiveDocument.InlineShapes.Item(1).Select
If Selection.Information(wdWithInTable) Then
MsgBox "In Table"
Else
MsgBox "Not In Table"
End If
我想删除所有Select
/Selection
等从我的代码和移动到基于索引的引用,然后我可以使用引用的形状来执行各种更改。但我似乎无法弄清楚如何确定它是否在表中。
我需要这样的东西:
Dim CurrentPicture As InlineShape
Set CurrentPicture = ActiveDocument.InlineShapes.Item(1)
If CurrentPicture.Information(wdWithInTable) Then
MsgBox "In Table"
Else
MsgBox "Not In Table"
End If