Hi Can Some Tell Me The Code That Opens Outlook Express To Send A Message And Adds The Email You Want To Send It To .
Thanks ;)
Printable View
Hi Can Some Tell Me The Code That Opens Outlook Express To Send A Message And Adds The Email You Want To Send It To .
Thanks ;)
Try thisalthough it triggers Outlook's security "feature", so it's better to not use Outlook to send mail.VB Code:
'strEmailRequestor is the person sending the email 'strEmailSubject is the subject 'strEmailBody is the text of the email Public Sub generate_email() Dim objOutlook As Object Dim mailRequestor As Object On Error GoTo GenerateError Set objOutlook = CreateObject("Outlook.Application", "localhost") Set mailRequester = objOutlook.CreateItem(olMailItem) mailRequester.To = strEmailRequester mailRequester.Subject = strEmailSubject mailRequester.Body = strEmailBody mailRequester.Send Exit Sub GenerateError: 'handle your errors here End Sub
Why don't you just search google. I know there is a thing that will let you do this. My suggestion is having a Process and using an html code.
Something like this
Then just search online for the mailto thing on how to add a richtextbox's text in there and you are set.VB Code:
Process.start("mailto: whomever")