S
Srinivas Shastri
Hi,
I am developing an HR app. The data of the contacts is in an Access 2000
database.
Whenever I double-click on a contact, the Access 2000 app opens a draft
email message in Outlook 2000 with the To... set to:
FirstName LastName [EmailID]
When I press Ctrl+K, this resolves correctly on my (development) PC to
"FirstName LastName" with the email ID "tucked" under the underlined name as
an SMTP address. The person "FirstName Lastname" is not part of my Outlook
contacts.
However, this behavior is not seen on the PCs of end users. After the
Ctrl+K, the To... box contains "FirstName LastName [EmailID]". Needless to
say, the underlined name refers to an invalid email ID.
This has become a sort of a showstopper for sending email messages through
the app. We could always set the To... to just the email ID, but that, IMO,
is unprofessional.
Thanks much,
Shastri
* The code snippet that I use is:
~~~~~
Public Sub gsubSendEmailMessage(ByVal vstrName As String, ByVal vstrEmailID
As String, ByVal vstrSubject As String, ByVal vstrBody As String)
On Error GoTo gsubSendEmailMessage_Err
Dim strTo As String
' To display the name and not the email ID in the To... box, use the
format: "Albert Pinto [[email protected]]" ;-)
strTo = vstrName & " [" & vstrEmailID & "]"
DoCmd.SendObject acSendNoObject, , acFormatHTML, strTo, , , vstrSubject,
vstrBody, , True
gsubSendEmailMessage_Exit:
On Error GoTo 0
Exit Sub
gsubSendEmailMessage_Err:
Call gsubRaiseError("gsubSendEmailMessage", Err)
Resume gsubSendEmailMessage_Exit
End Sub
~~~~~
I am developing an HR app. The data of the contacts is in an Access 2000
database.
Whenever I double-click on a contact, the Access 2000 app opens a draft
email message in Outlook 2000 with the To... set to:
FirstName LastName [EmailID]
When I press Ctrl+K, this resolves correctly on my (development) PC to
"FirstName LastName" with the email ID "tucked" under the underlined name as
an SMTP address. The person "FirstName Lastname" is not part of my Outlook
contacts.
However, this behavior is not seen on the PCs of end users. After the
Ctrl+K, the To... box contains "FirstName LastName [EmailID]". Needless to
say, the underlined name refers to an invalid email ID.
This has become a sort of a showstopper for sending email messages through
the app. We could always set the To... to just the email ID, but that, IMO,
is unprofessional.
Thanks much,
Shastri
* The code snippet that I use is:
~~~~~
Public Sub gsubSendEmailMessage(ByVal vstrName As String, ByVal vstrEmailID
As String, ByVal vstrSubject As String, ByVal vstrBody As String)
On Error GoTo gsubSendEmailMessage_Err
Dim strTo As String
' To display the name and not the email ID in the To... box, use the
format: "Albert Pinto [[email protected]]" ;-)
strTo = vstrName & " [" & vstrEmailID & "]"
DoCmd.SendObject acSendNoObject, , acFormatHTML, strTo, , , vstrSubject,
vstrBody, , True
gsubSendEmailMessage_Exit:
On Error GoTo 0
Exit Sub
gsubSendEmailMessage_Err:
Call gsubRaiseError("gsubSendEmailMessage", Err)
Resume gsubSendEmailMessage_Exit
End Sub
~~~~~