标题: 如何在access窗体中预览链接的word文档??? [打印本页] 作者: fong 时间: 2008-8-29 10:10 标题: 如何在access窗体中预览链接的word文档??? 请问各位专家,如何在access窗体中预览本地电脑的word文档?不是在表中创建ole,因为这样数据库变得狂大,是采用链接的方式,急呀,在网上找了半天,没有教程呀~~~~~作者: fong 时间: 2008-8-29 18:03
怎么没有人回答呀?很难吗?作者: Grant 时间: 2008-8-29 19:06
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CLIPSIBLINGS = &H4000000
Private Const WS_VISIBLE = &H10000000Private Sub Command1_Click()
Dim handle As Long, Ret As Long
'获取窗体句柄
handle = Form2.hwnd ' handle =FindWindow(vbNullString, "TheWorld") '示例手工输入外部窗体标题,如记事本
Ret = SetWindowLong(handle, GWL_STYLE, WS_VISIBLE Or WS_CLIPSIBLINGS)
'插入指定的窗体
SetParent handle, Picture1.hwnd
Form2.Move Picture1.ScaleLeft, Picture1.ScaleTop
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub作者: fong 时间: 2008-8-30 00:04
斑竹,能不能详细介绍一下呀,如何在access窗体里预览比如"c:\1.doc"的文件,你写得太牛了,但看得不是太明白~~~谢谢啦作者: fong 时间: 2008-8-30 11:55
到底如何做呀?高手在吗?作者: fong 时间: 2008-9-1 11:44
救救我呀~~~~~~高手们......作者: sgrshh29 时间: 2008-9-1 13:04