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