我使用的是 IBM Designer 9.0,因此在向笔记本发送通知时遇到问题。
我测试了我在互联网上找到的这段代码,但它不起作用。
Sub CreateMailNotification(doc As notesdocument, strSendTo As Variant, strSubject As String, strCopyTo As Variant)
Dim session As notessession
Dim db As notesdatabase
Dim docMail As notesdocument
Dim rtitem As Variant
Set db = doc.parentdatabase
Set session = db.Parent
Set docMail=db.createdocument
Set rtitem=docMail.CreateRichTextItem(“Body”)
If strSendTo(0)=”” Then Exit Sub
‘=====set mail
docMail.Form = “Memo”
docMail.From = session.UserName
docMail.Principle = session.UserName
docMail.SendTo = strSendTo
If Isarray(strCopyTo) Then
If strCopyTo(0)<>”” Then
docMail.CopyTo = strCopyTo
End If
Else
If strCopyTo<>”” Then
docMail.CopyTo = strCopyTo
End If
End If
docMail.Recipients = strSendTo
docMail.Subject = strSubject
docMail.PostedDate = Now
‘=====set body field
Call rtitem.AppendText(“Please click this doclink to see more details about the status ” + ” “)
Call rtitem.AppendDocLink( doc, “click to open document”)
Call rtitem.AddNewLine( 2 )
‘=====send mail
Call docMail.send(False)
End Sub
call Call CreateMailNotification (doc, doc.nmSendTo, strSubject,doc.nmCopyTo)
我对这两行有问题
调用 rtitem.AppendText(“请点击此文档链接查看更多关于状态的详细信息” + ” “) 调用 rtitem.AppendDocLink( doc, “点击打开文档”) 调用 rtitem.AddNewLine( 2 )