Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro which opens a new browser window, selects a web site to
access my company webmail, enters the information into the username and password fields, then proceeds to my mail. Everything works fine except I would like the browser window to open maximized. Could somebody please tell me how to do this. I've provided the code I use to access my mail. Sub WebMail() If Workbooks("MyWorkbook.xls").Worksheets("MyWorkshee t").Range("MyUsername").Value = "" Or Workbooks("MyWorkbook.xls").Worksheets("MyWorkshee t").Range("MyPassword").Value = "" Then frmWebMailLogin.Show Dim SB As clsWebLoad Dim nCounter As Integer Set ie = CreateObject("InternetExplorer.Application") Set SB = New clsWebLoad SB.Title = "WebMail Loader" SB.Show With ie ..Visible = False ' Go to Mail login page ..Navigate "http://MyWebmail.MyCompajy.com" Do Until .ReadyState = 4 nCounter = nCounter + 1 SB.Progress = nCounter If .ReadyState = 0 Then SB.Caption1 = "Opening New Browser Window " & CStr(nCounter) & "%" If .ReadyState = 3 Then SB.Caption1 = "Getting Web Site " & CStr(nCounter) & "%" If .ReadyState = 4 Then SB.Caption1 = "Operation Complete....Accessing Your Mail" Sleep 100 Loop Set ipf = ie.document.all.Item("Username") ipf.Value = Workbooks("MyWorkbook.xls").Worksheets("MyWorkshee t").Range("MyUsername").Value Set ipf = ie.document.all.Item("Password") ipf.Value = Workbooks("MyWorkbook.xls").Worksheets("MyWorkshee t").Range("MyPassword").Value ..Visible = True SendKeys "~", True EndRoutine: SB.Finish Set SB = Nothing End With StopSound End Sub Currently the browser opens in the previous windows state. I really don't want to change my windows settings to open maximized because normally I like it to open without filling the entire screen.Any help would be appreciated. TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I want Word & Excel to open maximized. | Excel Discussion (Misc queries) | |||
Open Excel not in a browser | Excel Discussion (Misc queries) | |||
excel can not open on some IE browser | Excel Discussion (Misc queries) | |||
File Open Box Suddenly Maximized | Excel Worksheet Functions | |||
How do I get excel to always open with a maximized window | Excel Discussion (Misc queries) |