魔方网表 让信息化更简单

 找回密码
 注册
查看: 1949|回复: 0

使用Sheel()函数在Excel中调用Word并打开一个DOC文档

[复制链接]
lnxxnchzyl 发表于 2009-10-19 09:58:09 | 显示全部楼层 |阅读模式
使用Sheel()函数在Excel中调用Word并打开一个DOC文档
这可是我们经常要用到的哦

Sub OpenDOC()
Dim RetVal
Dim filen As String
filen = InputBox("请输入文件名(含路径和扩展名)")
RetVal = Shell("D:\Programs\Microsoft Office\OFFICE11\WINWORD.EXE " + filen, vbNormalFocus)
Cells(1, 1) = RetVal
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|魔方软件 ( 京ICP备08008787号 )

京公网安备 11010702001722号

GMT+8, 2024-5-20 20:11 , Processed in 0.078355 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表