|
an IE browser with the method CreateObject()
Dim objIE, hwndIE
Set objIE = CreateObject("word.application")
objIE.Visible = true
'objIE.Navigate URL 'The parameter URL is the destination address for the IE browser
'Wait a while till the page is fully loaded
Wait(10)
'Move and resize the browser
hwndIE = objIE.HWND
Dim intPosX,intPosY,intSizeX,intSizeY
intPosX = 0 '设置移动的横坐标
intPosY = 0 '设置移动的纵坐标
intSizeX = 500 '设置窗体的横坐标大小
intSizeY = 500 '设置窗体的纵坐标大小
'Operate the IE browser as a window object with descrīptive programming
'The window object can be uniquely identified by the parameter hwndIE, which is the window's handle of the browser
Window ("hwnd:=" & hwndIE).Activate
Window ("hwnd:=" & hwndIE).Move intPosX, intPosY 'intPosX and intPosY represent the new location for the IE browser
Window ("hwnd:=" & hwndIE).Resize intSizeX, intSizeY 'intSizeX and intSizeY represent the new size for
'Release the object after the adjustment
Set objIE = nothing
运行至hwndword = XLApp.HWND时,程序提示“对象不支持此属性或方法HWND”
请问这是怎么回事,请各位大大给你帮助,小弟先谢谢了!!! |
|