M
McKilty
Here's a strange problem that recently popped up. I have a program
that creates an e-mail in Office 2003 via Outlook Redemption. This
program has worked for months, but suddenly it stopped working.
The applicable code is:
Dim olOutlook As Outlook.Application
Dim nsNameSpace As Outlook.NameSpace
Dim oSession As MAPI.Session
Dim mFolder
Dim itmEmails As Items
Dim iCount, iEmail, iLate, iSub As Double
Dim oItem
Dim sEntry, sStore, sSQLText, sBCC, sCC, s1Day, s2Day, sGT2Day, sBody
As String
Dim oMessage As MAPI.Message
Dim NewMail
Dim SafeMail
Set olOutlook = New Outlook.Application
Set nsNameSpace = olOutlook.GetNamespace("MAPI")
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "DS", , False, False
Set mFolder = nsNameSpace.Folders("Mailbox - Daily
Summary").Folders("DailySummaries")
Set itmEmails = mFolder.Items
Set itmEmails = itmEmails.Restrict("[ReceivedTime] < '" & Format(gDate
& " 11:59 PM", "MM/dd/yy hh:mm AMPM") & "'")
iCount = itmEmails.Count
For iEmail = 1 To iCount
Set oItem = itmEmails.Item(iCount - iEmail + 1)
sEntry = oItem.EntryID
sStore = oItem.Parent.StoreID
Set oMessage = oSession.GetMessage(sEntry, sStore)
Set NewMail = itmEmails.Item(iCount - iEmail + 1)
Set SafeMail = New Redemption.SafeMailItem
SafeMail.Item = NewMail
[SNIP]
The code runs fine on my computer, but on the intended server (where
it used to run fine) I get an error when it runs the line:
Set oMessage = oSession.GetMessage(sEntry, sStore)
The error message is:
Error Number -2147467259
The client operation failed. [Microsoft Exchange Server Information
Store - [E_FAIL(80004005)]]
Any ideas what could be wrong? I think the code is fine, so what
could have happened on the server?
that creates an e-mail in Office 2003 via Outlook Redemption. This
program has worked for months, but suddenly it stopped working.
The applicable code is:
Dim olOutlook As Outlook.Application
Dim nsNameSpace As Outlook.NameSpace
Dim oSession As MAPI.Session
Dim mFolder
Dim itmEmails As Items
Dim iCount, iEmail, iLate, iSub As Double
Dim oItem
Dim sEntry, sStore, sSQLText, sBCC, sCC, s1Day, s2Day, sGT2Day, sBody
As String
Dim oMessage As MAPI.Message
Dim NewMail
Dim SafeMail
Set olOutlook = New Outlook.Application
Set nsNameSpace = olOutlook.GetNamespace("MAPI")
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "DS", , False, False
Set mFolder = nsNameSpace.Folders("Mailbox - Daily
Summary").Folders("DailySummaries")
Set itmEmails = mFolder.Items
Set itmEmails = itmEmails.Restrict("[ReceivedTime] < '" & Format(gDate
& " 11:59 PM", "MM/dd/yy hh:mm AMPM") & "'")
iCount = itmEmails.Count
For iEmail = 1 To iCount
Set oItem = itmEmails.Item(iCount - iEmail + 1)
sEntry = oItem.EntryID
sStore = oItem.Parent.StoreID
Set oMessage = oSession.GetMessage(sEntry, sStore)
Set NewMail = itmEmails.Item(iCount - iEmail + 1)
Set SafeMail = New Redemption.SafeMailItem
SafeMail.Item = NewMail
[SNIP]
The code runs fine on my computer, but on the intended server (where
it used to run fine) I get an error when it runs the line:
Set oMessage = oSession.GetMessage(sEntry, sStore)
The error message is:
Error Number -2147467259
The client operation failed. [Microsoft Exchange Server Information
Store - [E_FAIL(80004005)]]
Any ideas what could be wrong? I think the code is fine, so what
could have happened on the server?