[求助]后期绑定方面出问题,前期绑定却没事,请高手来帮我看看
我想操纵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