如何打开WORD文件

lzfile 2007-11-21 11:30:45
如何打开WORD文件修改后,关闭WORD文件时将修改内容保存到数据库
...全文
52 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
jackmobile 2007-11-21
  • 打赏
  • 举报
回复
先选择对象库:Microsoft Excel 8.0对象库是相对于Excel的,而 Microsoft Word 8.0 对象库是为Word服务的
在VB的IDE环境中,从“工程”菜单中选择“引用”,可以看到系统可用的所有库列表。

Option Explicit

Dim xlsApp As Excel.Application
Dim wrdApp As Word.Application

Private Sub Command3_Click()
Set wrdApp = New Word.Application
With wrdApp
Show Word
.Visible = True
Create New Document
.Documents.Add
Add text to the document
.ActiveDocument.Content.Text = "Hi"
.ActiveDocument.Content.Text = "This is a test example"
End With
End Sub

7,765

社区成员

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

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