【发布时间】:2011-02-05 06:12:11
【问题描述】:
我知道这听起来很简单,但似乎并非如此。
如果我在 Word VBA 中写这个,它总是说“不兼容的类型”——为什么? 我该如何让它发挥作用?
Sub GetRange()
Dim r As Range
Set r = ActiveDocument.Paragraphs(5).Range
ProcessRange (r)
End Sub
Sub ProcessRange(r As Range)
Debug.Print "This generates an error (incompatible types)- why?"
End Sub
【问题讨论】: