例子:
[Visual Basic] 纯文本查看 复制代码 Dim objWord
Dim ObjDoc
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
Set ObjDoc = objWord.Documents.Open("F:\桌面\Test.docx") '自行修改
With objWord.Selection.Find
.Text = ","
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute , , , , , , , , , , 2
End With
MsgBox("处理完毕")
ObjDoc.Save
objWord.Quit
可以参考http://ask.zol.com.cn/x/8070991.html
弄成拖入处理
|