Hello all
I try to create a button which compose (not sending) a memo. In that memo should be some text prefilled which can be completed by the one composing the memo, an attachment (always the same file), recipient and subject are also already prefilled.
I started to create the script below (copy and paste).
The problem is that body text is not filled in and the document is saved under “drafts” but i won’t that. It only needs to be composed.
Can anybody support a notes designer newbe?
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( doc, "Body" )
Set object = rtitem.EmbedObject _
( EMBED_ATTACHMENT, "", "File.txt")
doc.Form = "Memo"
doc.Subject = "Survey"
Call doc.ReplaceItemValue( "SendTo", "Mike" )
Call doc.AppendItemValue("Body", "Tegscht")
Call doc.Save( True, True )
End Sub