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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new document sending problem (using document class - send method)

Status
Not open for further replies.

gem28

Instructor
Nov 5, 2001
64
PH
Hi everyone!

I have this form that I want to send to people in my "SendTo" field by clicking an action button. In the email to be sent, I would like everything that's inside my form to be found in the body of the email message.

I have this code (I got this from the help file):

Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim maildoc As notesdocument

Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
doc.Form = "Memo"
doc.SendTo = "SendTo"
doc.Subject = "Sample notification"
Call doc.Send( True, doc.SendTo)
Messagebox "Message sent"
End Sub


When I try to run this, it gives me an error message: "Notes error: No Names found to send mail to"

I'm quite stuck at this. I can't find other ways to solve the error.
Please help me... pretty pleaaaseee. Thanks so much! :)

tin
 
When you write
Code:
doc.SendTo = "SendTo"
you're not actually putting "SendTo" in the field, right ? I mean, you're just saying that the send to list is being populated, without giving actual names right ?
Because if not, it means you're sending your mail to "SendTo", which is obviously not an address, hence the error message.

I would let the user populate the SendTo field, and just use the
Code:
Call doc.Send( True, doc.SendTo)
code line to use the user-defined recipients. Unless you want to handle the recipient list yourself, in which case you need to put a valid address instead of "SendTo" in the SendTo field.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top