请帮忙看看 这段代码错在哪里了

xudoudou123 2005-08-22 05:11:16
代码如下:
<script language="VBScript">
<!--
Set wrdApp = CreateObject("Word.APPLICATION")
Set wrdDoc = wrdApp.Documents.Open("http://127.0.0.1:8080/templet/listing.doc")
wrdApp.Visible = True
Set myRange = wrdDoc.Range
myRange.Copy
myRange.Find.Execute FindText :="xpf1980", ReplaceWith :="test",Replace :=wdReplaceAll
Set wrdApp = Nothing
-->
</script>

发现 没有这行代码
myRange.Find.Execute FindText :="xpf1980", ReplaceWith :="test",Replace :=wdReplaceAll

WORD就可以正常出现 有了就不行了
请大家看看 我的替换语句哪里错了

...全文
79 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
VBDN 2005-08-23
  • 打赏
  • 举报
回复
myRange.Find.Execute "xpf1980", , , , , , , , , "test", wdReplaceAll
======================================================================
注意,这儿的“wdReplaceAll”应该用数字2代替,因为浏览器不认识wdReplaceAll。
VBDN 2005-08-23
  • 打赏
  • 举报
回复
myRange.Find.Execute "xpf1980", , , , , , , , , "test", wdReplaceAll
xudoudou123 2005-08-22
  • 打赏
  • 举报
回复
兄弟门 来帮忙啊
xudoudou123 2005-08-22
  • 打赏
  • 举报
回复
我对VBA不熟 请说的详细点 我这个是JSP调用,后台生成的
3q2008Com 2005-08-22
  • 打赏
  • 举报
回复
你录制宏比较一下

2,461

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧