this is driving me mad…Trying to export the current document as xml to a file, the code extract below is called from onsubmit() but cannot get the exported file to include any of the content in the rich text field (whether it be text, attachment or a picture). Any have any ideas??
Function isRTempty( this_doc As notesdocument, chkField As String ) As String
Subject: RE: CreateDXLExporter not exporting richtext content
To access the back-end rich text in a document you are editing, you have to first use uidoc.Refresh(True). This has other effects besides reloading the rich text, however (it refreshes the document and executes validation formulas).
You might want to check uidoc.fieldgettext first, because this doesn’t need to refresh the document and you know if there’s text in there the field is not empty. If you don’t see text, then you could refresh the document and look for other things.
There are also tricks you can do that involve moving the cursor to the field and trying to select all to see whether you get an error, but this may not work in later versions, and may also have side effects.