Guest_imported
New member
- Jan 1, 1970
- 0
I am attempting to write a form that sends mail to the administrator (that be me) of the database. I keep getting getting a compile error (method or data member not found). Can someone check this for me and tell me if they see what the problem is? Thank you!<br>
<br>
Here is the code:<br>
<br>
Private Sub Send_Click()<br>
<br>
<br>
<br>
Dim objSession As Object<br>
Dim objMessage As Object<br>
Dim objRecipient As Object<br>
<br>
'Create the Session Object<br>
Set objSession = CreateObject("mapi.session"<br>
<br>
'Logon using the session object<br>
'Specify a valid profile name if you want to<br>
'Avoid the logon dialog box<br>
objSession.Logon profileName:="MS Exchange Settings"<br>
<br>
'Add a new message object to the OutBox<br>
Set objMessage = objSession.Outbox.Messages.Add<br>
<br>
'Set the properties of the message object<br>
<br>
<br>
<br>
objMessage.subject = subject.TextBox <br>
<br>
objMessage.Text = Message.TextBox<br>
<br>
'Add a recipient object to the objMessage.Recipients collection<br>
Set objRecipient = objMessage.Recipients.Add<br>
<br>
'Set the properties of the recipient object<br>
objRecipient.Name = "<A HREF="mailto:john@tritechlabs.com">john@tritechlabs.com</A>" <br>
objRecipient.Type = mapiTo<br>
objRecipient.Resolve<br>
<br>
'Send the message<br>
objMessage.Send showDialog:=False<br>
MsgBox "Message sent successfully!"<br>
<br>
'Logoff using the session object<br>
objSession.Logoff<br>
<br>
End Sub<br>
<br>
<p>John Vogel<br><a href=mailto:john@computerwiz.net>john@computerwiz.net</a><br><a href=I am currently working on It should be LIVE 1/12/00 or before. I would appreciate suggestions, comments and the like. Please go look and help. Thanks.<br>
---========================
<br>
Here is the code:<br>
<br>
Private Sub Send_Click()<br>
<br>
<br>
<br>
Dim objSession As Object<br>
Dim objMessage As Object<br>
Dim objRecipient As Object<br>
<br>
'Create the Session Object<br>
Set objSession = CreateObject("mapi.session"<br>
<br>
'Logon using the session object<br>
'Specify a valid profile name if you want to<br>
'Avoid the logon dialog box<br>
objSession.Logon profileName:="MS Exchange Settings"<br>
<br>
'Add a new message object to the OutBox<br>
Set objMessage = objSession.Outbox.Messages.Add<br>
<br>
'Set the properties of the message object<br>
<br>
<br>
<br>
objMessage.subject = subject.TextBox <br>
<br>
objMessage.Text = Message.TextBox<br>
<br>
'Add a recipient object to the objMessage.Recipients collection<br>
Set objRecipient = objMessage.Recipients.Add<br>
<br>
'Set the properties of the recipient object<br>
objRecipient.Name = "<A HREF="mailto:john@tritechlabs.com">john@tritechlabs.com</A>" <br>
objRecipient.Type = mapiTo<br>
objRecipient.Resolve<br>
<br>
'Send the message<br>
objMessage.Send showDialog:=False<br>
MsgBox "Message sent successfully!"<br>
<br>
'Logoff using the session object<br>
objSession.Logoff<br>
<br>
End Sub<br>
<br>
<p>John Vogel<br><a href=mailto:john@computerwiz.net>john@computerwiz.net</a><br><a href=I am currently working on It should be LIVE 1/12/00 or before. I would appreciate suggestions, comments and the like. Please go look and help. Thanks.<br>
---========================