运算符是否在Word VBA中给出不同的结果

时间:2015-09-10 04:12:30

标签: vba ms-word word-vba

示例:

Dim para As Object
Set para = ThisDocument.Paragraphs(1)
'output True
MsgBox para.Format.Parent Is para.Borders.Parent

'output Flase
MsgBox para.Format.Parent Is ThisDocument.Paragraphs(1)

'output Flase
MsgBox para.Format.Parent Is ThisDocument.Paragraphs(1).Borders.Parent

为什么不同?

0 个答案:

没有答案