|
Subject:
|
open a Ms Word Application from browser
|
|
Posted By:
|
Sheikh Abdul Jaweed
|
Post Date:
|
12/11/2006 6:32:51 AM
|
Hi Dear,
I need to open a Ms Word Application from browser separately, which is working fine, but the problem is, it is opening in a minimize mode. I need it to be open in maximize mode with control/focus in it. Below is my code.
sub displayRTFDoc(rtfUrl) Dim oWordApp Set oWordApp = CreateObject("Word.Application") oWordApp.Visible = True oWordApp.Documents.Open(rtfUrl) oWordApp.Documents(1).Activate Set oWordApp = Nothing end sub
thanks Jaweed
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
12/15/2006 1:19:52 PM
|
Isn't there a .Maximize method? sub displayRTFDoc(rtfUrl)
Dim oWordApp
Set oWordApp = CreateObject("Word.Application")
oWordApp.Visible = True
oWordApp.Maximize
oWordApp.Documents.Open(rtfUrl)
oWordApp.Documents(1).Activate
Set oWordApp = Nothing
end subI'm not positive. It just seems to me that I remember that there is.
When I record a macro in Word, it creates Application.WindowState = wdWindowStateMaximize So maybe what you need to use is: oWordApp.WindowState = wdWindowStateMaximize ' (The value of the const is 1...)
|