Hi there,
We have recently migrated to Notes 6.5.1 from R5 and i have LS that sends a mail on a button click. This code works fine with R5 but when we try to open the mail in 6.5.1 we get the following message :
“A Stored form cannot contain computed subforms”
Here is the code i am using to send the mail :
Sub Click(Source As Button)
'Declare Variables
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Dim db As NotesDatabase
Dim rtf As NotesRichTextItem
Dim TheUser As String
Dim Currentdb As NotesDatabase
Dim view As NotesView
'Instantiate Objects / Initialise or Set Variables
Set uidoc = ws.CurrentDocument
Set maildoc = uidoc.document
Set db = s.GetDatabase("","")
TheUser = uidoc.FieldGetText("ErrUser")
Set Currentdb = s.CurrentDatabase
Set view = Currentdb.GetView( "Log An Error" )
'Setting the NewDoc field to No
uidoc.FieldSetText("ErrNewDoc"),"No"
'MailSend Code
Call db.OpenMail
Set doc = db.CreateDocument
With doc
.Form = "Memo"
.SaveMessageOnSend = False
.SendTo = "Jamie Grant"
.Subject = "CRM User Error"
Set rtf = .createrichtextitem("Body")
Call rtf.AppendText ("A TCC operative ( " & TheUser & " ) has made an error in the CRM. Please click the following link for more details ------> ")
Call rtf.AppendDocLink( maildoc, currentdb.Title )
Call .send(True)
End With
Call uidoc.save
Call uidoc.refresh
End Sub
If anyone can shed any light on this - that would be gr8. I have already searched the forum on this, and nothing really hit it on the head.
Thanks
Jamie Grant