Remove the 'store contents as MIME and HTML' property from saved RT field

Hi,

I have a document with a Rich Text Fld saved with the property ‘Store contents as MIME and HTML’ enabled.

Now I want to remove this property from the same document.

How can this be achieved?

Thanks,

Khusbu

Subject: RE: Remove the ‘store contents as MIME and HTML’ property from saved RT field

Write an agent to operate on the documents you want to convert.

session.ConvertMIME = true

dim rti as notesrichtextitem

set rti = doc.getfirstitem(“Body”) ’ or whatever it’s called.

rti.compact

doc.Save true, false, true

I think that should do it.

Of course you must update the form design too if you don’t want it to revert when next edited.

Also, as this is a little scary, you might want to try it out first in a copy of the design.

Subject: RE: Remove the ‘store contents as MIME and HTML’ property from saved RT field

Thanks for the response.

I am getting a ‘Type mismatch’ error on the GetfirstItem line.

Please help.

Thanks,

Khusbu

Subject: RE: Remove the ‘store contents as MIME and HTML’ property from saved RT field

Then it’s not a rich text item, but a text item (most likely). You will have to declare rti as variant and test the item type after you fetch it, to decide what to do with it. You could just leave it as text and move on to the next document, or delete the item and create a new rich text item with the same name and insert the same text.

Subject: RE: Remove the ‘store contents as MIME and HTML’ property from saved RT field

HI,

Thanks. It worked :slight_smile:

Regds,

Khusbu