Attachment in UI Mode

I have a form to attach a excel template.How can I check before saving the form whether attachment is present. (When it is in UIMode)

I know after the document is created it can be checked using

If rtitem Is Nothing Then

If ( rtitem.Type = RICHTEXT ) Then

Forall o In rtitem.EmbeddedObjects

If ( o.Type <> EMBED_ATTACHMENT ) Then

But How to do in UI Mode

Pls help…Thanks in advance

Subject: Attachment in UI Mode

you can’t. You should some external libraries like midas rich text library.Genii Software | MidasLSX

Subject: RE: Attachment in UI Mode

Thanks Mustafa