V
Vince Alexander
Hi, all.
Using Access 2000 and Outlook 2002
I need to send an email using data from a form and along
with a read receipt and then go to a new record on the
form.
I've installed the MAPI Session and Message ActiveX
controls. The properties for both controls are blank.
Below is my code behind a command button, which sends
multiple emails just fine
but I get only the first read receipt, if any at all.
The code seems to work fine in VB on top of SQL.
Any help appreciated..........
uncle vinnie
--------------------------------------------------
Private Sub Button2_Click()
SendTo = Me!OfficerName.Column(2)
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
'Set the email message
MAPIMessages1.RecipDisplayName = strDispName
'MAPIMessages1.RecipAddress = strRecipAdd
MAPIMessages1.RecipAddress = SendTo
' Resolve recipient name
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.MsgSubject = "Subpoena Notification" & " ("
& Me!Counter & ") " & " - " & Me!Defendant
MAPIMessages1.MsgNoteText = _
"You have received the following subpoena: " & vbCr & vbCr
& _
"Court: " & Me!Court & vbCr & _
"Court Date: " & Me!OffAppearDate & vbCr & _
"Court Time: " & Me!OffAppearTime & vbCr & _
"Cite/Case No: " & Me!CaseNo & vbCr & _
"DA No: " & Me!DANo & vbCr & _
"Defendant: " & Me!Defendant & vbCr & vbCr & _
"This subpoena was received on: " & Me!EnteredDate '&
vbCr & vbCr & _
"Additional Comments: " & txtEmail.Text
MAPIMessages1.MsgReceiptRequested = True
MAPIMessages1.Send
'MAPIMessages1.SessionID = 0 ***this didn't work***
MAPISession1.SignOff
DoCmd.GoToRecord , , acNewRec
End Sub
Using Access 2000 and Outlook 2002
I need to send an email using data from a form and along
with a read receipt and then go to a new record on the
form.
I've installed the MAPI Session and Message ActiveX
controls. The properties for both controls are blank.
Below is my code behind a command button, which sends
multiple emails just fine
but I get only the first read receipt, if any at all.
The code seems to work fine in VB on top of SQL.
Any help appreciated..........
uncle vinnie
--------------------------------------------------
Private Sub Button2_Click()
SendTo = Me!OfficerName.Column(2)
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
'Set the email message
MAPIMessages1.RecipDisplayName = strDispName
'MAPIMessages1.RecipAddress = strRecipAdd
MAPIMessages1.RecipAddress = SendTo
' Resolve recipient name
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.MsgSubject = "Subpoena Notification" & " ("
& Me!Counter & ") " & " - " & Me!Defendant
MAPIMessages1.MsgNoteText = _
"You have received the following subpoena: " & vbCr & vbCr
& _
"Court: " & Me!Court & vbCr & _
"Court Date: " & Me!OffAppearDate & vbCr & _
"Court Time: " & Me!OffAppearTime & vbCr & _
"Cite/Case No: " & Me!CaseNo & vbCr & _
"DA No: " & Me!DANo & vbCr & _
"Defendant: " & Me!Defendant & vbCr & vbCr & _
"This subpoena was received on: " & Me!EnteredDate '&
vbCr & vbCr & _
"Additional Comments: " & txtEmail.Text
MAPIMessages1.MsgReceiptRequested = True
MAPIMessages1.Send
'MAPIMessages1.SessionID = 0 ***this didn't work***
MAPISession1.SignOff
DoCmd.GoToRecord , , acNewRec
End Sub