bodylojohn
Registered User.
- Local time
- Today, 17:31
- Joined
- Dec 28, 2005
- Messages
- 205
I have written an application containing a textbox where an email address is displayed. When the user clicks the send button the "new email" window of outlook openes and the email adres is displayed in the "to" textbox of outlook.
I use the following code:
I also have the Microsoft Outlook 12.0 Object Library reference selected.
All this works great in outlook 2007.
But in outlook 2003 I get an error message.
How can I solve this. Obviously I can select only one outlook reference (there is also only the one mentioned above available).
Thanks in advance.
I use the following code:
Code:
Function EmailAdressToOutlook()
Dim objOL As Outlook.Application
Dim objOLMsg As Outlook.MailItem
Dim objOLRecip As Outlook.Recipient
Dim MyObject As Object
Set MyObject = CodeContextObject
Set objOL = CreateObject("Outlook.Application")
Set objOLMsg = objOL.CreateItem(olMailItem)
If Not IsNull(MyObject![Email]) Then
With objOLMsg
Set objOLRecip = .Recipients.Add(MyObject![Email])
objOLRecip.Type = olto
.Display
End With
End If
End Function
I also have the Microsoft Outlook 12.0 Object Library reference selected.
All this works great in outlook 2007.
But in outlook 2003 I get an error message.
How can I solve this. Obviously I can select only one outlook reference (there is also only the one mentioned above available).
Thanks in advance.