Solved

Getting text from browser control

Posted on 2002-03-21
6
132 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 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

20 Experts available now in Live!

Get 1:1 Help Now