I used the following code to automate excel in IE but i would like to do the same in EDGE with IE Mode.
Kindly guide me. Thanks in advance.
Dim str_val1 As Object
Dim str_val2 As HTMLIFrame
Dim str_val3 As HTMLInputElement
Set objShell = CreateObject("Shell.Application")
IE_count = objShell.Windows.Count
For x = 0 To (IE_count - 1)
On Error Resume Next
my_url = objShell.Windows(x).document.Location
my_title = objShell.Windows(x).document.Title
If my_title Like "XXXXX" & "*" Then
Set ie = objShell.Windows(x)
Exit For
Else
End If
Next
AppActivate ie
Set str_val4 = ie.document.frames(0).document
Set str_val2 = str_val4.getElementById("XXXXX")
Set str_val5 = str_val2.contentWindow.document.getElementById("XXXXX")
Kindly guide me. Thanks in advance.
Dim str_val1 As Object
Dim str_val2 As HTMLIFrame
Dim str_val3 As HTMLInputElement
Set objShell = CreateObject("Shell.Application")
IE_count = objShell.Windows.Count
For x = 0 To (IE_count - 1)
On Error Resume Next
my_url = objShell.Windows(x).document.Location
my_title = objShell.Windows(x).document.Title
If my_title Like "XXXXX" & "*" Then
Set ie = objShell.Windows(x)
Exit For
Else
End If
Next
AppActivate ie
Set str_val4 = ie.document.frames(0).document
Set str_val2 = str_val4.getElementById("XXXXX")
Set str_val5 = str_val2.contentWindow.document.getElementById("XXXXX")