I am using the following code in a word macro to determine if Outlook is
running, and if not to create an instance of it:
Set appOutlook = GetObject(, "Outlook.Application")
'check Outlook running
If appOutlook Is Nothing Then
'create an instance of Outlook (non-visible)
Set appOutlook = New Outlook.Application
End If
Set nmsOutlook = appOutlook.GetNamespace("MAPI"
Set fldPersonal = nmsOutlook.Folders("Personal Folders")
Set fldContacts = fldPersonal.Folders("Solicitors")
The code works fine under Windows 98, but in Windows 2000 although
everything is OK if Outlook is open, if it is not Outlook appears to start
and then crash (error message is access violation). Any suggestions?