We help IT Professionals succeed at work.

Reading Title from Internet Explorer Web Page

TravisMS
TravisMS asked
on
I'm writing a small VB app that is run from a custom Internet Explorer menu button.  When the app starts up, it opens a Common Dialog box to save a file.  I'd like the app to be able to read the Title of the browser's current HTML file and put that title into the Filename field of the Common Dialog.  Any ideas?
Comment
Watch Question

Richie_SimonettiIT Operations
CERTIFIED EXPERT

Commented:
hearing...

Author

Commented:
What's that supposed to mean?
CERTIFIED EXPERT
Commented:
In brief:
Private Sub Command1_Click()
   Dim sh As Object
   Set sh = CreateObject("Shell.Application")
   For Each ie In sh.Windows
       Debug.Print "Title: " & ie.Document.Title
       Debug.Print "--->Location: " & ie.LocationURL
'Any other IE/Document properties
   Next
   Set sh = Nothing
End Sub

For more advanced sample take a look on my code at
http://www.freevbcode.com/ShowCode.Asp?ID=1606

Cheers

Explore More ContentExplore courses, solutions, and other research materials related to this topic.