Monday, June 16, 2008

Rich Text attachment processing

Rich text validation:
If we want to process the attachments in a rich text field we normally use the following code
"Forall o In rtitem.EmbeddedObjects"
How ever, if there are no attachments in the field then we get type mismatch error. To avoid it we can use the following condition before the above code
"If Not Isempty(rtitem.EmbeddedObjects) Then
Forall o In rtitem.EmbeddedObjects
End forall
End If"

No comments: