Thanks in advance for any help!I have a database that keeps records of clients and any activites (meetings, phone calls etc) pertaining to those clients. There is a function “Email Outside” on the activity form. You select “Email Outside” and a new form is opened that inherits data from the selected activity. It looks a lot like an email form and you can then edit the body, sendto, copyto fields etc. There is also a richtext field where the user can attach attachments. Code to attach the attachment looks like this…
Sub Click(Source As Button)
Dim item As Variant
Dim rtitem As Variant
Dim rtitemM As Variant
doc.Status="Completed"
Call uidoc.Save
Set item = doc.GetFirstItem( “Body” )
Set maildoc = New NotesDocument(db)
maildoc.Form = "Memo"
maildoc.SendTo = doc.SendTo
maildoc.CopyTo = doc.CopyTo
maildoc.BlindCopyTo = doc.BlindCopyTo
maildoc.Subject = doc.Subject
'Add attachments
Dim rtext As Variant
Dim rtitemAct As Variant
Dim rtitemBody As Variant
activitykey = Right$(doc.ActNoteID(0), 8)
Set activitydoc = db.GetDocumentByID( activitykey )
'…attachments…
Set rtitemAct = New NotesRichTextItem(activitydoc, "Attach" )
Set rtitemBody = New NotesRichTextItem( maildoc, "Body" )
If ( rtitemAct.Type = RICHTEXT ) Then
Call rtitemBody.AppendRTItem( rtitemAct )
End If
Call item.CopyItemToDocument( maildoc, "Body" )
Call maildoc.Send( False )
Call uidoc.close
End Sub
Anyways, in debugger it appears that there is no attachment even when there is. I have checked that the field name is correct (Attach). In debugger it is setting rtitemact properly, but no attachment!
This was working ok as far as I know until we upgraded all the clients here to 6.5.
Any ideas?