怎样打开一个现有的WORD文档,而不是创建一个新的WORD?
解决方案 »
- 请教多次查询问题?
- 郁闷,一个SQL语句加上 order by 从句后就出错,请大虾帮忙,100分相送!
- mdi窗体怎么屏蔽掉最大化按钮啊?拿分娄!!!!!
- 高分请教activex控件发布问题
- 关于ToolBar上按钮灰显的问题
- 软件发布,欢迎下载使用。有要注册码的留下E-mail!
- 请教各位,vb中文件删除涵数是什么?
- 系统菜单问题
- 凡说“一定再加分”的多数最后连帐都没结
- 1.请问vb6.0中的listview控件中的picture如何实现平铺呢?(像netant1.0那样)
- 一个半月,马甲也升星了。散~~
- 高难问题:A软件如何才能知道B软件的一级菜单项"搜索(S)"下面的二级菜单项"结束(E)"是处于可用还是不可用?
dim path as string
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 Const sw_shownormal = 1
Private Const sw_showminimized = 2
path="d:\kpsdf.doc"
Call shellexecute(Me.hwnd, "open", path, vbNullString, vbNullString, sw_shownormal)
Dim WdDocument As Word.Document
Dim UserFile As String
Set Wdapp = New Word.Application
'先做一个word模板,然后打开
UserFile = App.Path & "\电子病历模板.doc"
Set WdDocument = Wdapp.Documents.Open("userfile")
Dim wdDoc As Word.Document
Dim OpenFile As StringSet wdApp = CreateObject("Word.application")
Set wdDoc = wdApp.Documents.Open("d:\例.doc")
......wdDoc.Close
wdApp.Quit
Set wdDoc = Nothing
Set wdApp = Nothing