Open Outlook express from Accss

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an email address field on a form and would like to be able to double
click, have it open Outlook in the "Create mail" mode and automatically
insert the selected email address.
 
Hi Rick,

Remember that Outlook and Outlook Express are totally separate
applications.

If you just want to kick off an email using the workstation's default
email client, just use something like this:

Docmd.SendObject _
ObjectType:=acSendNoObject, _
To:=Me.Controls("EmailAddress").Value, _
EditMessage:=True
 
Hi Rick,
Another solution would be as in my vba below;
Private Sub cmdOutlook_Click()
On Error GoTo StartError
Dim objOutlook As Object
Dim objItem As Object
'Create a Microsoft Outlook object.
Set objOutlook = CreateObject("Outlook.Application")
'Create and open a new contact form for input.
Set objItem = objOutlook.CreateItem(olContactItem)
'To create a new appointment, journal entry, email message, note, post,
'or task, replace olContactItem above with one of the following:
'
' Appointment = olAppointmentItem
'Journal Entry = olJournalItem
'Email Message = olMailItem
' Note = olNoteItem
' Post = olPostItem
' Task = olTaskItem

objItem.Display
'Quit Microsoft Outlook.
Set objOutlook = Nothing

Exit Sub
StartError:
MsgBox "Error: " & Err & " " & Error
Exit Sub

End Sub

Perhaps this will help you out. For me it just works fine.
Greetings,
Harry
 
Except that your code is for Outlook, and the OP wants code for Outlook
Express.

Outlook Express does not expose itself for Automation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top