jlsmithhartfiel
Programmer
Hi!
I have gotten some great code snippets from this forum. What I'm doing is searching for an IE window that has a particular title & bring it to the front. (Intranet app, so title should always be the same) If it's not open, open it.
What I'm looking for now:
Now that I have the window, how can I load in a particular frame on page1.htm?
TIA,
Jessica
Jessica![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
I have gotten some great code snippets from this forum. What I'm doing is searching for an IE window that has a particular title & bring it to the front. (Intranet app, so title should always be the same) If it's not open, open it.
What I'm looking for now:
Now that I have the window, how can I load in a particular frame on page1.htm?
Code:
Public Sub GetClassNameFromTitle()
Dim sInput As String, lpClassName As String
Dim nMaxCount As Long, lresult As Long, Hwnd As Long
nMaxCount = 256
lpClassName = Space(nMaxCount)
sInput = "My Intranet App - Microsoft Internet Explorer"
Hwnd = FindWindow(vbNullString, sInput)
If Hwnd = 0 Then
openIE
Else
lresult = GetClassName(Hwnd, lpClassName, nMaxCount)
SetForegroundWindow Hwnd
ShowWindow Hwnd, SW_SHOWMAXIMIZED
'Navigate to frame "mainFrame" in page1.htm????
End If
End Sub
Public Sub openIE()
Dim StartDoc As Long
StartDoc = ShellExecute(Hwnd, "open", "[URL unfurl="true"]http://www.test.com/page1.htm",[/URL] _
"", "C:\", SW_SHOWMAXIMIZED)
End Sub
TIA,
Jessica
Jessica
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)