Another Email from form question

Red6

Registered User.
Local time
Today, 11:07
Joined
Jan 9, 2003
Messages
28
Yes - I know there are several responses to this on the forums and as such I have followed the advice given but am struggling.

It's in respect of opening an email in Outlook from an email address in a field.

The code below opens Outlook and populates the To: Field, however after the email address it also puts:

#http://fred.bloggs@durt

so what you get is: fred.bloggs@durtmond.co.uk#[url]http://fred.bloggs@durt[/url]

Code starts:

Private Sub Email_DblClick(Cancel As Integer)

Dim StrInput As String
StrInput = "mailto:" & Me!
Application.FollowHyperlink StrInput, , True

End Sub

Code ends

I suspect it is something to do with the:

Application.FollowHyperlink StrInput, , True

But I have tried removing this part of the code and then nothing works.

My coding experience is limited to copying bits from samples and then trying to work out what they are doing but I can't suss this one.

Any assistance appreciated

Ian
 
try this
none of this is my work I have ripped this out from somewhere else
works in Access 2000

Private Sub Command13_Click()

Dim EmailApp, NameSpace, EmailSend As Object

Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)

EmailSend.To = [Forms]![claimsreporter]![text8]** this bit is the field on my form **
EmailSend.Subject = "Claims Report for" & " " & [Forms]![claimsreporter]![Text3]]** this bit is the field on my form **

'EmailSend.Message = "h:\email.txt" (THIS FAILED)(You don't need this bit but i have left the code in )
EmailSend.Attachments.Add "C:\temp\cancellation.xls" (** if you want an attachment )
EmailSend.Display

Set EmailApp = Nothing
Set NameSpace = Nothing
Set EmailSend = Nothing
 

Users who are viewing this thread

Back
Top Bottom