Rich text field and dblookup in formula language

I am trying to import an email from the mailbox into a form in another database. I am able to get the sendto, copyto, and other fields. But I am not able to get the body field which is rich text. Does anyone know how to get the Body (rich text field) by using the formula language?

Here is my code:

REM {Variables};

tRepID := “85256498:007255BE”;

tView := “($Users)”;

tView1 := “(CMSII Lookup 2)”;

tView2 := “(CMSII Lookup)”;

tKey := @UserName;

REM {Get the mailfile name};

tMailFile := @DbLookup(“”: “NoCache”; tRepID; tView; tKey; 7);

@SetField(“Mail”; tMailFile + “.nsf”);

@Command([ViewRefreshFields]);

REM {Now I need to have a picklist so the user can select which email to copy over};

tMessage := @PickList([Custom] : [Single]; “Domino” : Mail; tView2; “Select Item to Import”; “Please select the message that you want to import into this document:”; 13);

REM {Get the data from the email that is needed};

To := @DbLookup(“” : “NoCache”; “Domino” : Mail; tView1; tMessage; “SendTo”);

CC := @DbLookup(“” : “NoCache”; “Domino” : Mail; tView1; tMessage; “CopyTo”);

BCC := @DbLookup(“” : “NoCache”; “Domino” : Mail; tView1; tMessage; “BlindCopyTo”);

Subject := @DbLookup(“” : “NoCache”; “Domino” : Mail; tView1; tMessage; “Subject”);

PostedDate := @DbLookup(“”: “No Cache”; “Domino” : Mail; tView1; tMessage; “PostedDate”);

REM {Can not get this into the form. Same field name and everything as the memo in the mailbox};

Body := @DbLookup(“”: “No Cache”; “Domino” : Mail; tView1; tMessage; “Body”);

REM {Set the fields in the memo in the CMSII};

@SetField(“SendTo”; To);

@SetField(“CopyTo”; CC);

@SetField(“BlindCopyTo”; BCC);

@SetField(“Subject”; Subject);

@SetField(“Body”; Body);

@SetField(“PostedDate”; PostedDate);

@Command([ViewRefreshFields])

Thanks,

Jamie

Subject: rich text field and dblookup in formula language

You can’t. Period.

Subject: rich text field and dblookup in formula language

@dblookup can’t return rich text field.

But you can do it with @command:

  1. Open the email document y edit mode

    @command([fileopendatabase…);

    @command([editdocument]; “1”);

  2. Go to body field, select all, copy and close document window and view window:

    @command([editgotofiled]; “Body”);

    @command([editselectall]);

    @command([editcopy]);

    @command([fileclosewindow]);

    @command([fileclosewindow]);

  3. go to your field and paste:

    @postedcommand([editgotofield]; “Body”);

    @command([editpaste])

Subject: RE: rich text field and dblookup in formula language

Thank you very much. I have gotten this to work. My boss and the president of the company arevery happy. This is something that is very important for them.