[求助]请高手进来帮我看看,后期绑定方面的
我想操纵word,并进行一些文字替换,可是程序只有前期绑定才能正常运行,而后期绑定却不行,请高手帮我看看。先谢谢了。程序如下:
Private Sub Command1_Click()
Dim mywdapp As Object
Dim mysel As Object
Set mywdapp = CreateObject("word.application")
mywdapp.Visible = True
mywdapp.Documents.Open "c:\1.doc"
mywdapp.ActiveDocument.Content.InsertAfter vbCrLf & "**123456789"
mywdapp.ActiveDocument.Content.Find.Execute FindText:="**", _
ReplaceWith:="hello", Replace:=wdReplaceAll
End Sub 谢谢各位,问题已解决,改wdReplaceAll为2。
页:
[1]