title: Validating Attachment in Richtext field
body: <p>I am using below code to validate the Attachment in Richtext field.</p>
  
  <p>If I will not used Call source.Refresh(True)
  then validation is not working, but this code is also refreshing document everytime querysave is called in buttons.</p>
  
  <p>So is there any option or any other idea so that I should not user this Refresh part or entire code to validate . </p>
  
  <p>If anybody have more efficient code then please share this.  </p>
  
  <pre><code>If Source.Document.YesNo20(0)="Yes" Then
      Call source.Refresh(True)
      Dim rtitem As NotesRichTextItem
      Set rtitem = source.Document.GetFirstItem( "Atchmnt20" ) 
      NotesEmbeddedObjectArray = rtitem.EmbeddedObjects
      If Isempty ( NotesEmbeddedObjectArray ) Then 
          Messagebox "Please enter an attachment in 20a. As you selected option Yes"
          continue=False
          Exit Sub
      End If 
  End If
  </code></pre>