C
Charlie
Oh, I see. So then if I add this code at the beginning of my code I can
remove the reference to Oulook Library and it will create a reference to
which ever one the computer has?
Dim oOLK As Object
Dim OLKVersion As Long
On Error Resume Next
OLKVersion = 12 'looking ahead<g>
Do
Set oOLK = CreateObject("Outlook.Application." & CStr(OLKVersion))
If oOLK Is Nothing Then
OLKVersion = OLKVersion - 1
End If
Loop While oOLK Is Nothing And OLKVersion >= 9 'Outlook 2000
On Error Goto 0
If oOLK Is Nothing Then
MsgBox "Outlook unfavourable"
Else
MsgBox "Outlook " & Cstr(OLKVersion) & " launched."
End If
Thanks,
ck
remove the reference to Oulook Library and it will create a reference to
which ever one the computer has?
Dim oOLK As Object
Dim OLKVersion As Long
On Error Resume Next
OLKVersion = 12 'looking ahead<g>
Do
Set oOLK = CreateObject("Outlook.Application." & CStr(OLKVersion))
If oOLK Is Nothing Then
OLKVersion = OLKVersion - 1
End If
Loop While oOLK Is Nothing And OLKVersion >= 9 'Outlook 2000
On Error Goto 0
If oOLK Is Nothing Then
MsgBox "Outlook unfavourable"
Else
MsgBox "Outlook " & Cstr(OLKVersion) & " launched."
End If
Thanks,
ck