[quote] putroppo ho degli allegati e l\'unico metodo che potrebbe funzionare .EmbeddedObjects. Perņ non funziona perfettamente, ho inserito il mio codice in QuerySave di una form Dim rtitem1 As NotesRichTextItem ... Set rtitem1 = doc.GetFirstItem( "ReqID" ) ... If Isempty( rtitem1.EmbeddedObjects) Then Messagebox "You must enter a requirement ID ",, "No ReqID" Call Source.GotoField("") Continue = False End If perņ quando salvo la prima volta mi da l\'errore"Object variable not set" grazie [/quote] Dunque la prima volta basta mettere un if uidoc.isNewDoc. Inoltre ti consiglio di inserire un controllo anche su riteml se č not nothing. Inoltre sul discorso allegati puoi fare anche questi controlli: Forall obj In doc.EmbeddedObjects If obj.Name = "xxx" Then End If End Forall Inoltre se ci sono allegati esiste un campo $FILE che č valorizzato (ma non riesce a sapere a quale RichText appartiene). Forall i In doc.Items If i.name = "$FILE" Then ....
|