Hello all,
I want to create a button on a form, that opens a new blank memo with the value from a field on the form entered in the recipient field.
How can I do this? It is of course easy to have the button create a memo, but I want the value from the form to be entered automatically.
Thanks.
/Marcus
Subject: Button code
Sub Click(Source As Button) Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Dim doc As NotesDocument
Set doc = uidoc.Document
Dim item As NotesItem
If Not doc.co_e_mail(0) = "" Then
Set item = doc.GetFirstItem("co_e_mail")
Dim maildb As New NotesDatabase("", "")
Call maildb.OpenMail
Dim mailnote As NotesDocument
Set mailnote = New NotesDocument(maildb)
Call mailnote.CopyItem(item, "SendTo")
mailnote.Form = "Memo"
mailnote.Logo = session.GetEnvironmentString("DefaultLogo", False)
mailnote.Principal = session.UserName
Call workspace.EditDocument(True, mailnote)
End If
End Sub