I am trying to figure out how to get the document title with dom.
Here is an example of what I thought would work:
Code:
msgbox myIE.document.Title
or
msgbox myIE.Title
That tells me that the "Object doesn't support this property or method"
This works:
Can anyone that uses DOM tell me how to find the page title??
This is killing me, I can do everything else, but this.
Also as a side note, I have this function that finds the page title just fine:
Code:
Function IE_FindOpenInstance(i_Title, _
Optional ByVal i_ExactMatch As Boolean = True) As SHDocVw.InternetExplorer
Dim objShellWindows As New SHDocVw.ShellWindows
If i_ExactMatch = False Then i_Title = "*" & i_Title & "*"
'ignore errors when accessing the document property
On Error Resume Next
'loop over all Shell-Windows
For Each IE_FindOpenInstance In objShellWindows
'if the document is of type HTMLDocument, it is an IE window
If TypeName(IE_FindOpenInstance.Document) = "HTMLDocument" Then
'check the title
If IE_FindOpenInstance.Document.Title Like i_Title Then
'leave, we found the right window
Exit Function
End If
End If
Next
End Function