Link to home
Start Free TrialLog in
Avatar of thorpey83
thorpey83Flag for Australia

asked on

How can I display the formatted text from an Access memo field in my VB6 app?

I need to be able to display the formattde text from an Access 2003 memo field in my VB6 app. The richtextbox displayes it as per the example below. I tried copying and pasting the memo field contents into wordpad and then saving it as an rtf file. If I then load this file into RichTextBox it displays correctly! I need a way of copying and pasting the memo filed contents into an rtf file then all will work for me! Can anyone help me with this?
The memo field contents are below as an example(unformatted):

<div><font face="Comic Sans MS" size=1 color=black><strong>cavity brick</strong> </font></div>

<div><font face="Comic Sans MS" size=1 color=black>? outer leaf 90-110mm, inner leaf 90-110mm</font></div>

<div><font face="Comic Sans MS" size=1 color=black>? cavity 40-75mm</font></div>

<div>&nbsp;</div>

<div>&nbsp;</div>


Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

you will need to use a RichTextBox control, not the normal TextBox control.
 
AW
Ok, did not read your post completely.  I quess the problem is that what you have is HTML, not 'rich text'.  The HTML will need a WebBrowser control on your form.
 
AW
Avatar of thorpey83

ASKER

Thanks Arthur. I have loaded a Webbrowser to my app but can't seem to find a way of simply loading the memo filed contents into it! Can you please help me with this?
Hi again Arthur,
I have discovered somehting else......if I open the Access DB, highlight the formattde text in the memo field, copy it to the clipboard, then paste it into the richtextbox, all is good. I try to copy & paste using VB6 with the clipboard gettext and settext methods, and the text is pated unformatted!
Can someone help me with this?
ASKER CERTIFIED SOLUTION
Avatar of Dana Seaman
Dana Seaman
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial