423,099 Members | 2,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,099 IT Pros & Developers. It's quick & easy.

Displaying fields containing HTML codes

P: 44
Hi,

I have a field that store HTML codes.

How do I output them to MS Access Report / MS Word in HTML format or text format?

Kindly advise.

Regards,
Clarence
Jan 16 '08 #1
Share this Question
Share on Google+
5 Replies


Denburt
Expert 100+
P: 1,356
I am not really sure what you are trying to do. One suggestion is to stream it into a file and name the file whatever.html Or you could set up and xml stylesheet so you can export the data to an xml file and use an HTML page to view it... Lots of possibilities. If you wanted to output just the text that is encased in html tags then that might take a bit of work but could be done by hardcoding each tag that you want removed or look for an open bracket "<" Then the close bracket ">" or something along those lines. I think I will need a little more input before I can make any more suggestions. Thanks hope this helps.
Jan 17 '08 #2

P: 44
Hi Denburt,

Thanks for your reply.

I would like the output to be formatted text. For example, if the text stored in the table is "</b>TEST</b>", the output text should be a bold TEST.

Preferably, I could output this to a MS Access Report.

Regards,
Clarence

I am not really sure what you are trying to do. One suggestion is to stream it into a file and name the file whatever.html Or you could set up and xml stylesheet so you can export the data to an xml file and use an HTML page to view it... Lots of possibilities. If you wanted to output just the text that is encased in html tags then that might take a bit of work but could be done by hardcoding each tag that you want removed or look for an open bracket "<" Then the close bracket ">" or something along those lines. I think I will need a little more input before I can make any more suggestions. Thanks hope this helps.
Jan 18 '08 #3

Denburt
Expert 100+
P: 1,356
Hi Denburt,

Thanks for your reply.

I would like the output to be formatted text. For example, if the text stored in the table is "</b>TEST</b>", the output text should be a bold TEST.

Preferably, I could output this to a MS Access Report.

Regards,
Clarence
Well I think I would start in the reports detail section, using the OnFormat event. How good is your VBA? If you code something up and have problems I will be more than glad to help. If you would like some direction I would suggest using the instr() function to locate then remove the "<b>" and "</b>" once this is done then you could format that control to be bold and look for your next tag.
Jan 30 '08 #4

jaxjagfan
Expert 100+
P: 254
Never tried this but ...

Access report will display the content of a field whether it is "<b>my text</b>" or "my text".

If you are creating an HTML doc on the fly based on entries in a table you will need to include the header section and body section. This will need to be exported to a text document. If you have a preformatted template text doc with the header already set then WRITE the other elements to the body and close body. Save as HTML.
Jan 30 '08 #5

P: 1
I think what you are really asking is how do you show html enhanced code in a text box, not literally show the codes. I had the same problem and finally figured it out. Go to the properties of the box's Data tab. You'll probably see it by now; the Text Format property has to be Rich Text, NOT Plain Text. Seems odd a property with Format in the name is not found on the Format tab...
6 Days Ago #6

Post your reply

Sign in to post your reply or Sign up for a free account.