|
3#
楼主 |
发表于 2010-7-10 07:00:15
|
只看该作者
本帖最后由 sxgaobo 于 2010-7-10 07:43 编辑
谢谢站长的关注!
如果我没理解错的话,是数据类型的问题,现在的是文本型,所以只能255个,怎样能改为备注型的啊?我需要传递更多的字符.
我把代码传上来,方便各位查看
On Error Resume Next
Dim docApp As Object
Set docApp = GetObject(, "Word.Application")
If Err Then
Err.Clear
Set docApp = CreateObject("Word.Application")
If Err Then
MsgBox "操作中没有装WORD程序!", vbQuestion, "系统提示"
Exit Sub
End If
End If
docApp.Visible = False
Dim Doc As Object
Dim win As Object
Set Doc = docApp.Documents.Add(CurrentProject.Path & "\一般处罚.doc")
Set win = Doc.ActiveWindow
win.View.SeekView = wdSeekPrimaryHeader
With win.Selection.Find
.Text = "[内容]"
.Replacement.Text = [1]
.Execute , , , , , , , , , , 2
End With
docApp.Visible = True
|
|