大智

快乐工作中生活

 

页面内打开word 组件。

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Private Sub Command1_Click()
Dim wrdObject As Word.Application
Set wrdObject = CreateObject("Word.Application")
wrdObject.Visible = True
Dim hwd As Long
hwd = FindWindow(vbNullString, "microsoft word")
'SetParent hwd, Frame1.hWnd
SetParent hwd, Text1.hWnd

 

posted on 2008-12-05 22:08  lgzh  阅读(268)  评论(0编辑  收藏  举报

导航