Silvia Parfeni
Silvia Parfeni

Reputation: 528

How to work with rich text in Access 2013

I have a ms access 2013 database, Into my database I have a table, it looks samthing so :

enter image description here

my text1 Is an Ole Object date type, here's a rtf text. elemple :

 {\rtf1 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid14841988 Hello}}

if I write this text into rtf file and I open it with Word, the file Word have write "Hello" text. How can I create with msAccess 2013 an rtf file, or to show into a report this column text ?? Which is the best way to show this column text??? Thank you a lot

Upvotes: 0

Views: 8529

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123419

Probably your best option for the future would be to

  1. Upgrade the database from Access 2003 (.mdb) to Access 2013 (.accdb).
  2. Add a new column named Text1_NEW as Long Text (previously known as Memo) with its Text Format property set to Rich Text.
  3. Convert the RTF-encoded text from the Text1 field into HTML-encoded text and save it in the Text1_NEW field.
  4. Once you've verified that the conversion was successful, delete the Text1 field and rename the Text1_NEW field to Text1.

Then you could use the "rich text" Long Text field with a regular Text Box control in Access 2013.

For an idea as to how you might actually convert the RTF-encoded text to HTML-encoded text, see my other answer here. That answer uses Word to save an RTF document to plain text, but it could just as easily save the document as HTML. Do note, however, that Word tends to produce rather bloated HTML documents, so check the results of a small test before performing a wholesale conversion.

Upvotes: 2

Related Questions