B
blgsai
We used to have Outlook 2000 with Word 2000 and I used the automation code
below which worked fine. We then migrated to Outlook 2003 with Word 2000 and
the same piece of code does not work. What am I missing? Pls help. See code
below:
Dim myOutlook As Object
Dim myInspector As Object
On Error Resume Next
Set myOutlook = GetObject(, "Outlook.Application")
If myOutlook Is Nothing Then
Set myOutlook = CreateObject("Outlook.Application")
End If
On Error GoTo 0
If myOutlook Is Nothing Then
MsgBox "Application Not Available"
End If
Set myInspector = myOutlook.ActiveInspector
myInspector.Activate
MsgBox myInspector.CurrentItem.Subject, vbInformation
Set myOutlook = Nothing
below which worked fine. We then migrated to Outlook 2003 with Word 2000 and
the same piece of code does not work. What am I missing? Pls help. See code
below:
Dim myOutlook As Object
Dim myInspector As Object
On Error Resume Next
Set myOutlook = GetObject(, "Outlook.Application")
If myOutlook Is Nothing Then
Set myOutlook = CreateObject("Outlook.Application")
End If
On Error GoTo 0
If myOutlook Is Nothing Then
MsgBox "Application Not Available"
End If
Set myInspector = myOutlook.ActiveInspector
myInspector.Activate
MsgBox myInspector.CurrentItem.Subject, vbInformation
Set myOutlook = Nothing