Hello All,
I've developed a console application (VB.NET) that retrieves the list of unread messages to extract their attachments and save them into the file system... The app. works fine when it's double clicked.. But my problem is when creating a scheduled task on Windows Server 2000. the app. throws an error:
The server is not available. Contact your administrator if this condition persists.
Knowing that it's running as administrator account.
Dim oApp As Outlook.Application = New Outlook.Application
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
oNS.Logon("(e-mail address removed)", Missing.Value, False, True) 'Failed
Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
Dim oItems As Outlook.Items = oInbox.Items
oItems = oItems.Restrict("[Unread] = true")
Any help would be highly appreciated...
Regards,
Baha A. Ghanim
I've developed a console application (VB.NET) that retrieves the list of unread messages to extract their attachments and save them into the file system... The app. works fine when it's double clicked.. But my problem is when creating a scheduled task on Windows Server 2000. the app. throws an error:
The server is not available. Contact your administrator if this condition persists.
Knowing that it's running as administrator account.
Dim oApp As Outlook.Application = New Outlook.Application
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
oNS.Logon("(e-mail address removed)", Missing.Value, False, True) 'Failed
Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
Dim oItems As Outlook.Items = oInbox.Items
oItems = oItems.Restrict("[Unread] = true")
Any help would be highly appreciated...
Regards,
Baha A. Ghanim