Solved

Getting text from browser control

Posted on 2002-03-21
6
131 Views
Last Modified: 2010-05-02


I need to grab all of the text, HTML and all, from my web browser control in VB.  Can someone point me in the rignt direction?

Thanks,
Bryan
0
Comment
Question by:bfeddish
  • 3
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 50 total points
ID: 6885623
Text1.Text = WebBrowser.Document.documentElement.outerhtml
0
 
LVL 1

Author Comment

by:bfeddish
ID: 6885685

That was it, thanks.

I'll add another 100 points if you answer this one:

I want to send this as an email. If I just say:

MAPIMessages1.MsgNoteText = WebBrowser1.Document.documentElement.outerhtml

The message body looks like this in Outlook when it is recieved:

<HTML><HEAD><TITLE></TITLE>
<STYLE type=text/css>
     <!--Set the link colors-->
     <!-- BODY

.... Etc.

How can I have to so when they open the email they get the formated HTML page instead of the HTML itself.

Thanks,
Bryan
0
 
LVL 1

Author Comment

by:bfeddish
ID: 6885752

That was it, thanks.

I'll add another 100 points if you answer this one:

I want to send this as an email. If I just say:

MAPIMessages1.MsgNoteText = WebBrowser1.Document.documentElement.outerhtml

The message body looks like this in Outlook when it is recieved:

<HTML><HEAD><TITLE></TITLE>
<STYLE type=text/css>
     <!--Set the link colors-->
     <!-- BODY

.... Etc.

How can I have to so when they open the email they get the formated HTML page instead of the HTML itself.

Thanks,
Bryan
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 18

Expert Comment

by:bobbit31
ID: 6885925
i do this:

MAPIMessages1.Compose
MAPIMessages1.MsgNoteText = "<html><b>hello world</b></html>"
MAPIMessages1.RecipAddress = "test@aol.com"
MAPIMessages1.Send

and i get the formatted text in outlook
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6886413
I hope bobbit answered the second part of your question...all it sounded like was that it was not treating the email as a formatted html message.  Since I dont use Outlook, I dont know if thats a setting you must set to tell it to treat a message as being html formatted.
0
 
LVL 1

Author Comment

by:bfeddish
ID: 6886440

It must be a setting as I just get the HTML code and not the formatted text in my email.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now