Hi
I have an eMail button that emails to an outside (possible non Lotus Notes) address. The other part of the issue is that only part of the current documents Form1 needs to be sent. I have created Form2 that only has the fields that I want to be emailed. I am using the following code to attach the current document to the email as a rich text item, but I need to send Form2 which would only send the necessary fields. As you can see from my code, I'm not sure how to connect subform to subdoc. The following code gives me a Instance member RENDERTORTITEM does not exist error.
Dim subform As NotesForm
Set subform = db.GetForm("Form2")
Set subdoc = New notesdocument(db)
Set subdoc = uidoc.document
subdoc.Form = "Form2"
Set subdoc = workspace.currentdocument
Dim rtitem As notesrichtextitem
Set rtitem = New NotesRichTextItem( maildoc, "Body" )
Dim success As Variant
Call RTitem.appendtext(maildoc.MSG(0))
Call RTitem.addnewline(1)
' Attach form to body of email
success = subdoc.RenderToRTItem( rtitem )
Call maildoc.Send(False)
Any Lotus Script code for this would be appreciated.
Thanks
I have an eMail button that emails to an outside (possible non Lotus Notes) address. The other part of the issue is that only part of the current documents Form1 needs to be sent. I have created Form2 that only has the fields that I want to be emailed. I am using the following code to attach the current document to the email as a rich text item, but I need to send Form2 which would only send the necessary fields. As you can see from my code, I'm not sure how to connect subform to subdoc. The following code gives me a Instance member RENDERTORTITEM does not exist error.
Dim subform As NotesForm
Set subform = db.GetForm("Form2")
Set subdoc = New notesdocument(db)
Set subdoc = uidoc.document
subdoc.Form = "Form2"
Set subdoc = workspace.currentdocument
Dim rtitem As notesrichtextitem
Set rtitem = New NotesRichTextItem( maildoc, "Body" )
Dim success As Variant
Call RTitem.appendtext(maildoc.MSG(0))
Call RTitem.addnewline(1)
' Attach form to body of email
success = subdoc.RenderToRTItem( rtitem )
Call maildoc.Send(False)
Any Lotus Script code for this would be appreciated.
Thanks