There are two computers involved,
The first one is Vista Home Premium SP1 with
Windows Mail Version 6.0.6000.16386 (vista_rtm.061101-2205)
and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 9.0 Object Library
The second is XP Professional Version 2002 SP2
with Outlook Express 6 Version 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158) and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 11.0 Object Library
I have an Access Form with a Command Button to send email with the following code.
Expand|Select|Wrap|Line Numbers
- Private Sub MySendEmail_Click()
- Dim stDocName As String
- Dim stLinkCriteria As String
- Dim Subject As String
- Dim message As String
- If IsNull([email]) Or ([email]) = "" Then
- MsgBox "There is no E-mail address entered for this person!"
- Exit Sub
- Else
- stLinkCriteria = [Forms]![EmailForm]![email]
- stSubject = "Re: Your Application"
- stMessage = [Forms]![EmailForm]![message]
- DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , , stSubject, stMessage, True
- End If
- End Sub
The problem is on the Vista machine, with Windows Mail open and working fine, when I click the Command Button I get the following:
Run-time error '2287': can't open the mail session.
Note: On the Vista machine, if I use a Command Button with a Hyperlink Address in Properties, It works just fine.
Any help would be appreciated.