Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2006, 02:36 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default View Text in HTML Format

Does anyone know if I can view text with the HTML markup displaying?

In other words. I have a textbox that contains text and HTML tags. I would like to see what the text would look like if it was in a browser. I have added a Web Browser control, but am not sure how to set the source to a field in my database.

Any ideas,

Thanks

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
Reply With Quote
  #2 (permalink)  
Old February 13th, 2006, 01:47 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Well, I have a kludge you can use without the control.

Put a button on your form, then on the On Click event,

Capture the value in the text field, and then create an html file and drop it on the root drive C:

Then open internet explorer, and call the html file as your link.

When you want to look at the next value, overwrite the html file. SO this way you only have one html file on the root of C: at a time, and are not accumulating them.

On the Form's On Close event, you erase the file.

Something like this:
'Without the declarations
Const ForWriting = 2
stText = "<html><head><title>New Page 1</title></head><body>Hello World</body></html>"

stLink = "C:\CurrentRecord.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(stLink) ' this will overwrite

Set objFile1 = objFSO.OpenTextFile(stLink, ForWriting)
objFile1.WriteLine stText

Set objExplorer = CreateObject("InternetExplorer.Application")
        objExplorer.Navigate stLink
        objExplorer.Visible = 1

This should work. It will open IE and show the contents of the file. I use IE and files to make Help systems for the apps I develop, but I usually make them in FrontPage. I will try this making pages on the fly (which some developers recommend.)

HTH


mmcdonal
Reply With Quote
  #3 (permalink)  
Old February 13th, 2006, 01:55 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Thanks Mike,

That should work, I'll let you know how it goes.

Thanks

Mike

Mike
EchoVue.com
Reply With Quote
  #4 (permalink)  
Old February 13th, 2006, 01:58 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I didn't have time to test it, and my filesystem permissions are giving me a headache (new network program). HTH

mmcdonal
Reply With Quote
  #5 (permalink)  
Old February 13th, 2006, 02:00 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I can't see any reason why it wouldn't work, and I got the idea to put the Browser Control in a window and so instead of opening up IE, I could just have a form popup, and make the source the file on the C:Drive.

Thanks again,

Mike

Mike
EchoVue.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent - Send mail with plain view and html view ashish.dadhwal ASP.NET 2.0 Professional 0 November 27th, 2008 01:49 AM
Convert Rich Text Format to Ordinary Format in ASP Andraw Classic ASP Basics 1 August 31st, 2007 10:05 AM
Datasheet view of a Query - Field Format arfa Access 4 March 13th, 2006 12:34 PM
datagrid view date format slyverson General .NET 2 December 3rd, 2005 10:52 AM
How can I view an XML doc to HTML format jolo98 XML 3 July 23rd, 2004 01:02 AM



All times are GMT -4. The time now is 04:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.