OutLook Express

Rockape

Registered User.
Local time
Today, 16:14
Joined
Aug 24, 2007
Messages
271
Hi all,

Hope someone can help. Please bear with me....

The problem:

I have a table that includes email addresses. This is formatted as type as Hyperlink. Within that table I also have names and other details.


The form I'm working on selects a name from a list and the details appear on the side in unbounded boxes. (No problems so far!)

Problem 1 : the output in the email address appears as double i.e. qwerty@blip.dn#qwerty@blip.dn#

Problem 2: I have a send email button which opens outlook express and mails to the above erroneous email using the following code

Private Sub cmd_sendemail_Click()
On Error GoTo Err_sendemail

If IsNull(Me.txt_email) Then
MsgBox "This person has no email", , "Email Out"
Else
DoCmd.SendObject , , , (Me.txt_email)
End If

Exit_sendemail_Click:
Exit Sub

Err_sendemail:
MsgBox Err.Description
Resume Exit_sendemail_Click
End Sub


Is there anyway that the correct email address can be realised.


Problem 3: When outlook express starts and I decide to cancel the mail the following error msg appears

The sendobject action was cancelled, etc.etc.

Is there any wayy of disabling this comment???

any help much appreciated.
 
I just have the e-mail address as a text box and refer to that text box in the To field of the Send Object, works ok.
And for the sendobject was cancelled, I have a 'prettier' message appear, saying it wasn't sent...

Code:
   DoCmd.SetWarnings False
On Error GoTo cmdEmail_Err
    DoCmd.SendObject , "", "", "Matthew.king@###.com", "", "", [UserName] & " is a user of " & [Version], "Your Asset number = " & [asset], True
    MsgBox "Thank you for letting us know.", vbOKOnly, "Sent"
cmdEmail_Exit:
    Exit Sub
cmdEmail_Err:
    MsgBox "You did not send the email, dipstick", vbExclamation
    Resume cmdEmail_Exit
    DoCmd.SetWarnings True
 
Hi,

thanks for your suggestion....i've managed to glean some useful codes from there.

Many regards



I just have the e-mail address as a text box and refer to that text box in the To field of the Send Object, works ok.
And for the sendobject was cancelled, I have a 'prettier' message appear, saying it wasn't sent...

Code:
   DoCmd.SetWarnings False
On Error GoTo cmdEmail_Err
    DoCmd.SendObject , "", "", "Matthew.king@###.com", "", "", [UserName] & " is a user of " & [Version], "Your Asset number = " & [asset], True
    MsgBox "Thank you for letting us know.", vbOKOnly, "Sent"
cmdEmail_Exit:
    Exit Sub
cmdEmail_Err:
    MsgBox "You did not send the email, dipstick", vbExclamation
    Resume cmdEmail_Exit
    DoCmd.SetWarnings True
 
Code:
DoCmd.SendObject acSendNoObject, , , Me![frmPrimary-Email]![EMail Addr], , , , , True,[YourTemplateFile].htm

Hopefully that'll work, I've never used templates...:rolleyes:

Slightly different code, but you get the idea, the template is located as the last criteria on the SendObject command.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom