编译好类注册并引用后,为什么看不到属性?
The project name is "SaveWord" and the module name is "Toword".
There is a function named "UpdateWord" in this module.
But when I write the code: set ttt = createobject(saveword.
I want to see the function name, but nothing occured. It said"未找到方法或数据成员"
What's the matter?? Help me...
The module function is as following:
===========================
Public Function UpdateWord(strarr() As Byte) As Integer
Dim Wobj As Word.Application
Dim wordDoc As Word.Document
Set Wobj = CreateObject("Word.Application")
Set wordDoc = Wobj.Documents.Open("c:\subject.doc")
Wobj.Application.Visible = False
Wobj.Selection.Find.ClearFormatting
Wobj.Selection.Find.Replacement.ClearFormatting
For i = 1 To 10
If IsNull(strarr(i, 1)) = False And strarr(i, 1) <> "" Then
strRep = strarr(i, 2)
With Wobj.Selection.Find
.Text = strarr(1, 1)
.Replacement.Text = strRep
.Forward = True
.MatchByte = True
End With
Wobj.Selection.Find.Execute Replace:=wdReplaceAll
End If
Next i
wordDoc.Save
wordDoc.Close
Set wordDoc = Nothing
Set Wobj = Nothing
toword = 1
End Function