compatibility problems - Outlook

gilberto

Registered User.
Local time
Today, 17:02
Joined
Apr 4, 2002
Messages
29
Dear all

I have an Access database which creates emails using Outlook and that I have to share with other users. Recently I upgraded my system to Access2003 + Outlook2003 and compiled the database in this new platform.

The problem is that the other users have Outlook2000, and the database isn't working there. If they change manually the Reference Object in Visual Basic (unclicking "Microsoft Outlook 11.0 Object Library: Missing" and clicking "Microsoft Outlook 9.0 Object Library") then the database works fine.

I would need an automatic detection of the right library!

I've been searching the forum and found related problems:
http://www.access-programmers.co.uk/forums/showthread.php?t=71875&highlight=msoutl.olb

there is also a dicussion that goes beyond my basic knowledge:
http://www.access-programmers.co.uk/forums/showthread.php?p=300460&mode=linear#post300460

I tried to change my VB code to binding but doesn't seem to work (or maybe I'm doing something wrong!).
http://support.microsoft.com/kb/245115

I would be really grateful if someone could please help me with this issue (but my knowledge of VB is quite limited). Many thanks in advance.
Gilberto


This is the code I'm using for sending emails:

Public Sub SendEmail(StrSubject As String, StrBody As String, StrTo As String, Optional LowImportance As Boolean)

Dim NameSpace As Object
Dim EmailApp As Object

Set EmailApp = CreateObject("Outlook.Application") 'using the outlook object
Set EmailSend = EmailApp.CreateItem(olMailItem)
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
EmailSend.Subject = StrSubject
EmailSend.Body = StrBody

If LowImportance = False Then
EmailSend.Importance = olImportanceHigh
End If

EmailSend.Recipients.Add (StrTo) 'add the recipient
EmailSend.Display 'display the email

Set EmailApp = Nothing
Set EmailSend = Nothing
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom