|
-
Jun 16th, 2008, 08:36 AM
#1
Thread Starter
Hyperactive Member
[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
Last edited by Amien; Jun 16th, 2008 at 08:39 AM.
-
Jun 16th, 2008, 11:20 AM
#2
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?
-
Jun 16th, 2008, 11:47 AM
#3
Thread Starter
Hyperactive Member
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
-
Jun 16th, 2008, 11:59 AM
#4
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.
-
Jun 16th, 2008, 12:02 PM
#5
Thread Starter
Hyperactive Member
Re: [Word/VBA] Writing HTML to TextBox
In Visual Studio i would use the WebBrowser1 Control. VBA doesnt have that option
-
Jun 16th, 2008, 12:05 PM
#6
Thread Starter
Hyperactive Member
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.
-
Jun 16th, 2008, 12:49 PM
#7
Re: [Word/VBA] Writing HTML to TextBox
 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....
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jun 16th, 2008, 01:19 PM
#8
Thread Starter
Hyperactive Member
Re: [Word/VBA] Writing HTML to TextBox
 Originally Posted by koolsid
Hope this helps....
Alot .. tnx .. works fine
-
Jun 16th, 2008, 01:20 PM
#9
Thread Starter
Hyperactive Member
Re: [RESOLVED] [Word/VBA] Writing HTML to TextBox
bit surprised that it has the option .. VBA more powerful than i thought
-
Jun 16th, 2008, 01:24 PM
#10
Thread Starter
Hyperactive Member
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")
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
|