Import WordPad RTF file into an RTF Memo field in Access 2007


G

genojoe

I would like to import and export RTF documents into a table memo field that
supports RTF using code. For exporting text, I use the following

sFile = "c:\temp\EmailsSent.txt"
sText = Now & " is the date sent."
Dim a As Object
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(sFile, 8, False)
a.WriteLine (sText)
a.Close

Is there similar code that I can use to transfer the contents of an RTF memo
field in a table to and from an RTF file?
 
Ad

Advertisements

R

Rick Brandt

I would like to import and export RTF documents into a table memo field
that supports RTF using code. For exporting text, I use the following

sFile = "c:\temp\EmailsSent.txt"
sText = Now & " is the date sent."
Dim a As Object
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject") Set a =
fs.OpenTextFile(sFile, 8, False) a.WriteLine (sText)
a.Close

Is there similar code that I can use to transfer the contents of an RTF
memo field in a table to and from an RTF file?

If you are talking about the new "rich text" feature in Access 2007 I
think you will have problems because it is actually HTML, not "real" rich
text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top