好像以前说过?不引用类型库
我在2005里试了一下是可以的
vb代码:
Private oApp As Object Public Property Get Application() As Object If Not oApp Is Nothing Then Set Application = oApp End Property
Public Property Let Application(ByVal vNewValue As Object) Set oApp = vNewValue End Property
Public Sub Test() pnt = oApp.ActiveDocument.Utility.GetPoint() MsgBox pnt(0) & "," & pnt(1) & "," & pnt(2) End Sub
VBA代码:
Sub t5() Dim a As New TlsTest a.Application = Application a.Test
End Sub