importing raw RTF code

Students send me RTF documents as email attachments. Some online email browsers upload files from some versions of MS Word into the body of the email - no file is attached. This gives me the raw RTF code to work with. Like this:

{\rtf1\ansi\ansicpg1252\uc1\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{*\panose … and so on.

I’ve tried to import the code to DT, but I can’t get it to display properly. This, however, works:

  1. copy RTF code and paste to new TextEdit document - still looks like code
  2. save
  3. drag the file to DT - now appears as text

I’d like to eliminate the TextEdit step. Is there any way to convert the code directly with DT?

Could you provide us some non-working example documents? Thanks.

I get a "post too long" message if I try to include the document here, so I emailed it to you.

Thanks for the document. Probably one of the next releases will automatically detect plain text containing RTF code.

is this possible now? To create an RTF record within DEVONthink starting from raw RTF code? e.g.


\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;\\f1\\fnil\\fcharset0 HelveticaNeue-Bold;\\f2\\fnil\\fcharset0 HelveticaNeue;


etc. etc.

it works perfectly in the file system (via applescript) but I can’t get it to work for internal notes (create record with…)

a workaround could be to save the file in FInder, and then import it as recommended here, but I was wondering if there is a better way?

Why are you dealing with the raw RTF data?

I want to populate an RTF template via applescript and I find it easier (?) to add my custom text to the raw RTF code after reverse engineering it. Again, it works perfectly by writing to disk, importing to DT, then deleting the disk file, but I was wondering if I can avoid the workaround.

If you’re scripting it anyway, you could just import the file into DT as a final step.

1 Like