[RESOLVED] [Word/VBA] Writing HTML to TextBox
i have a textbox that shows the content of a certain website.
i fill the textbox with:
Code:
TextBox30.Text = objDocument.documentElement.innerText
objDocument.documentElement.innerHTML will show the text in HTML. but can Textbox translate that HTML code a show the website with all the correct layout/colors from the HTML?
Thanks in advanced
Re: [Word/VBA] Writing HTML to TextBox
I don't understand what you mean by "translate" - what do you want to do with the textboxs content? Do you want to actually display the page?
Re: [Word/VBA] Writing HTML to TextBox
Yes .. i want to see the same as it would be in IE/FireFox.. same look, only in TextBox
Re: [Word/VBA] Writing HTML to TextBox
You can't display a web page in a textbox.
In order for the page to be created, the code behind it, which is now in your textbox, needs to execute.
The only thing the code in your textbox is going to do is sit there in your textbox being straight text.
What is the purpose for this? Perhaps some kind of work around can be arrived at.
Re: [Word/VBA] Writing HTML to TextBox
In Visual Studio i would use the WebBrowser1 Control. VBA doesnt have that option
Re: [Word/VBA] Writing HTML to TextBox
The purpose of that the html written in the textbox as text is a bit messed up .. the webpage in html has more structure and more easy to read.
the html that i'm getting is not some fancy website with flash etc. Its a normal website, with just some colors and breaklines.
Re: [Word/VBA] Writing HTML to TextBox
Quote:
Originally Posted by Amien
In Visual Studio i would use the WebBrowser1 Control. VBA doesnt have that option
VBA has that option :)
To put a Webbrowser control on a userform, right click the Control Toolbox and select Additional Controls
Scroll down to Microsoft Web Browser and put a check next to it.
Then you can drag the control onto your userform and control it just like an instance of InternetExplorer.
Hope this helps....
Re: [Word/VBA] Writing HTML to TextBox
Quote:
Originally Posted by koolsid
Hope this helps....
Alot :) .. tnx .. works fine
Re: [RESOLVED] [Word/VBA] Writing HTML to TextBox
bit surprised that it has the option .. VBA more powerful than i thought :)
Re: [RESOLVED] [Word/VBA] Writing HTML to TextBox
btw .. the website is in a string. How can i sent that string to WebBrowser1?
dont wanna use Webbrowser1.Navigate("www.website.com")