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

PLEASE HELP problem with e-mail

Status
Not open for further replies.

sayako

Technical User
Aug 13, 2002
3
US
I have been trying to do e-mail merge in outlook with ACCESS source. ACCESS transfers e-mail address to outlook with word "mailto:", and outlook can't recognize the e-mail address as legitimate one becuase of this. Is there any solution?
Is there any way, I can format ACCESS to automatically record e-mail field as hyperlink without typing "mailto:"???
Also is there any way that I can transfer all e-mail address to outlook without having "mailto:"???
your suggestion will be greatly appreciated!!

thank you
 
I came to this conclusion after I asked a similiar question,
"I totally ditched what I had and ventured into Automation. I was doing the DoCmd.SendObject command. I have everything worked out now. And I highly suggest automation. If anyone wants to read up on Automation for VB it can be found on the Microsoft Knowledge Base. It is the introductory article and tutorial: Search for Q260410, then download the CHM file. "

I suggest that you look at the automation tutorial in the download, it has very usefull examples, that should get you started. In one of the examples, it has the fix to the mailto: problem you mentioned, it actually looks up the correct email.

TheRaven
"Remember, it's just ones and zeros"
 
Copy/paste this into a module and edit to your hearts content. Don't forget to reference...

' Reference Outlook to your database: Toos/References
Function TekTipsMailHelp()
On Error GoTo Errhandler
Dim PersonSendTo As String
Dim SubjectLine As String
Dim MsgBody As String

PersonSendTo = "MyEmail@Email.com" 'adjust to your email address
MsgBody = Chr(13) & &quot;<br><br>&quot; & Chr(13) & &quot;Please Check the Database for New Record Entries.&quot; & Chr(13) & _
&quot;<br><br>&quot; & Chr(13) & &quot;<br><br>&quot;
SubjectLine = &quot;New Record Has Been Added.&quot;

Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject(&quot;Outlook.Application&quot;)
Set MailOutLook = appOutLook.CreateItem(olMailItem)

With MailOutLook
.To = PersonSendTo
.Subject = SubjectLine
.HTMLBody = MsgBody & &quot;<br><br>&quot;
.Send
End With

Exit_sub:
Exit Function

Errhandler:
'GoTo Exit_sub
MsgBox Err.Description

End Function

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top