|
-
January 26th, 2000, 10:01 AM
#1
HTMLDocument
Hi,
I wanted to do something really simple in VB using HTMLDocument. What I wanted to do was to retrieve the title of a URL. What would be the easiest way to do this using HTMLDocument. Example below:
...
Set inet = New HTMLDocument
inet.open "http://www.codeguru.com"
Title.Text = inet.Title
inet.Close ...
I'm not sure about the third line, I have an edit box on my form called title, and I wanted to set the text to whatever the title of the URL was. If you can help me out, I'd really appreciate it.
TIA, -Lito
-
January 26th, 2000, 11:48 AM
#2
Re: HTMLDocument
here is a working sample
Dim h as new HTMLDocument
w.navigate "http://yourURLGoesHere"
set h = w.document
MsgBox h.Title
w is the name of a Web Browser control
-
January 26th, 2000, 02:19 PM
#3
Re: HTMLDocument
Just exactly what is "w"?
-
January 27th, 2000, 02:05 AM
#4
Re: HTMLDocument
did you really read my post?
>w is the name of a Web Browser control
That's what it is: the name of a Web Browser control that I placed on the form -> Project/components/Microsoft Internet Controls
-
January 27th, 2000, 03:21 PM
#5
Re: HTMLDocument
Is there some other reference that I have to set for this code to work? I keep getting the lovely User-defined type not defined on the New HTMLDocument. I already have the Internet Controls checked in both the references and components. Any suggestions?
Thanks,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
January 27th, 2000, 03:54 PM
#6
Re: HTMLDocument
Nevermind, hehehe, typo.
it happens to everyone. (shrug)
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|