Solved

Getting text from browser control

Posted on 2002-03-21
6
133 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

786 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