exodius Posted November 20, 2006 Share Posted November 20, 2006 I'm looking at this example from this post... Is there a way to make it so when I resize the window to smaller that the Microsoft Word object also resizes?expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded() GUICreate("Embedded Word control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) $GUI_Button_Open = GUICtrlCreateButton("Open File", 10, 420, 100, 30) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_Button_Open $sFile = FileOpenDialog("Open Word File", @MyDocumentsDir, "Word Doc (*.Doc)") If $sFile <> "" Then _IENavigate ($oIE, $sFile, 0) While $oIE.ReadyState <> 4 Sleep(50) WEnd $oDoc = $oIE.Document $oWord = $oDoc.Application ; Put document into 'Web View' mode $oWord.Activewindow.View = 6 ; Manage display of toolbars $oDoc.CommandBars ("Reviewing").visible = False $oDoc.CommandBars ("Standard").Visible = True EndIf EndSwitch Sleep(50) WEnd _IENavigate ($oIE, "about:blank") $oDoc = 0 $oWord = 0 GUIDelete() Exit Link to comment Share on other sites More sharing options...
BigDod Posted November 21, 2006 Share Posted November 21, 2006 (edited) expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded() GUICreate("Embedded Word control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUICtrlSetResizing (-1,$GUI_DOCKBORDERS) ; <---- Added this line $GUI_Button_Open = GUICtrlCreateButton("Open File", 10, 420, 100, 30) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_Button_Open $sFile = FileOpenDialog("Open Word File", @MyDocumentsDir, "Word Doc (*.Doc)") If $sFile <> "" Then _IENavigate ($oIE, $sFile, 0) While $oIE.ReadyState <> 4 Sleep(50) WEnd $oDoc = $oIE.Document $oWord = $oDoc.Application ; Put document into 'Web View' mode $oWord.Activewindow.View = 6 ; Manage display of toolbars $oDoc.CommandBars ("Reviewing").visible = False $oDoc.CommandBars ("Standard").Visible = True EndIf EndSwitch Sleep(50) WEnd _IENavigate ($oIE, "about:blank") $oDoc = 0 $oWord = 0 GUIDelete() Exit Edited November 21, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
exodius Posted November 21, 2006 Author Share Posted November 21, 2006 So simple but so right, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now