Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I use a different Form to email from the current document

Status
Not open for further replies.

joeydog

Programmer
Sep 16, 2008
3
US
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
 
This is a "Lotus Approach" section, not "Notes".

Sue Sloan
 
Sorry if I posted in the wrong Forum. Please define what Lotus Approach is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top