要确定Shape是否在Table
范围内,您可以使用以下代码:
ActiveDocument.InlineShapes.Item(1).Select
If Selection.Information(wdWithInTable) Then
MsgBox "In Table"
Else
MsgBox "Not In Table"
End If
我正在尝试从代码中删除所有Select
/ Selection
等并转移到基于索引的引用,然后我可以使用Referenced形状执行各种更改。但我似乎无法弄清楚如何确定它是否在表中。
我需要类似的东西:
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
答案 0 :(得分:0)
只需使用以下内容:
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
position = position || 0;
return this.substr(position, searchString.length) === searchString;
};
}