Displaying HTML in Access

tehNellie

Registered User.
Local time
Today, 23:26
Joined
Apr 3, 2007
Messages
751
This is for access 2003 btw on the off chance 2007 does something obvious with this.

I suspect I already know the answer to this but I'm going to try anyway.

I have a legacy application in Access with a SQL server backend. As these things do, requirements have changed, the original version was clunky and I've redeveloped the Access app around the new functionality rather than start from scratch using VB.net or C# or something.

Part of the new functionality uses SQL Server to Send mail to people about stuff. A copy of the mail is formatted in HTML, placed in a table and every x minutes a job scans the table, sends outstanding mail and archives it off for audit purposes.

The formatting and sending is all peachy, I can link the mail to the comments field and all that cool stuff but what I'd like them to be able to do is to view on demand one or more of the sent emails.

The mail itself is stored in the DB as raw HTML ie

Code:
</font><font FACE=Arial SIZE=2>
<font SIZE=2>
<p></p>
</font>
<p>Hello,</p>
etc etc.

It's pretty basic stuff, no buttons, images or anything more complicated than a couple of tables. Is there an easy way I can display this within a form in access?
 
Within Access you would have to parse the html yourself, but then you would have the problem of having to use a rich text box to display what html can. The other idea, which I like better, would be to write the html code in the message to a temp folder and file with a suffix of .html. Then you could do an interal hyperlink to this new file which will present the email message to your user.
 
Just to update.

I had considered vic's suggestion of outputting the HTML into a file but felt it was a little "scrappy" so I opted for a slightly less [only just] scrappy solution which tied in nicely with my need to start using .net.

I created a little vb form to display the mail in HTML which calls a stored procedure to extract the email using an id forwarded from the Access application as a command line parameter when it launches the vb app.
 
HTML Editor

Attached is an HTML Editor that I found somewhere.

PC
 

Attachments

Users who are viewing this thread

Back
Top Bottom