高手请进

yAnGmU_373 2006-02-10 11:30:58
怎样能在VB里面打开并在前台显示指定的WOED文件???
...全文
90 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yAnGmU_373 2006-02-10
  • 打赏
  • 举报
回复
谢谢 了
faysky2 2006-02-10
  • 打赏
  • 举报
回复
或者用Shell函数(需要指定安装的Word的路径)

Private Sub Command1_Click()
Shell "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE c:\test.doc"
End Sub
迈克揉索芙特 2006-02-10
  • 打赏
  • 举报
回复
Private Sub Command1_Click()
ShellExecute 0, "open", "c:\aa.doc", "", "", 1
End Sub
faysky2 2006-02-10
  • 打赏
  • 举报
回复
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
ShellExecute 0, "open", "c:\test.doc", "", "", 1
End Sub
yAnGmU_373 2006-02-10
  • 打赏
  • 举报
回复
能给个例子吗?
迈克揉索芙特 2006-02-10
  • 打赏
  • 举报
回复
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
benyfeifei 2006-02-10
  • 打赏
  • 举报
回复
可以在工程里引用 “Microsoft Word 9.0 Object Libray”类库,可以实现VB中编辑Word。

7,785

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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