outlooklover
New Member
- Outlook version
- Outlook 2016 32 bit
- Email Account
- Office 365 Exchange
Hello,
I have a random issue where moving a MailItem to a sub-folder (uner the same Exchange Store)
FAILS from time to time.
The real issue is that Outlook stops "seeing" sub-folders under the "\\DRK\DefaultInbox\".
* It basicaly shows the "DefaultInbox" sub-folder to have "zero" sub-folders.
** VBA and VBNET- same phenomemon.
By thwe way, Redemption does not have this issue.
Sample and edited code from slipstick.com :
FolderPath = \\DRK\DefaultInbox\CannoSeeThis"
FoldersArray = Split(FolderPath, "\")
Set oFolder = Application.Session.Folders.item(FoldersArray(0))
If Not oFolder Is Nothing Then
For i = 1 To UBound(FoldersArray, 1)
Dim SubFolders As Outlook.Folders
Set SubFolders = oFolder.Folders <<<< The error will happen here for "DefaultInbox"
Set oFolder = SubFolders.item(FoldersArray(i))
If oFolder Is Nothing Then
Set GetFolderPath = Nothing
End If
Next
End If
I investigated more and it seems that when the issue happens, the EntryId of the "DefaultInbox" folder is WRONG .
It can be seen by the following experiment-
* Just for testing, I requested (Outlook native code) the folder using the CORRECT entryid (and storeid) :
Set ns = Application.GetNamespace("MAPI")
Set oFolder = ns.GetFolderFromID("000000001558C00B64527A4E83C186E33FCE9CCF018018D07E87680CDD48B628CC1483CA3B1B00001BAEBE590100", _
"0000000038A1BB1005E5101AA1BB08002....")
* However, what I got is a folder with a DIFFERENT entryid-
?oFolder.EntryID
000000001558C00B64527A4E83C186E33FCE9CCF010018D07E87680CDD48B628CC1483CA3B1B00001BAEBE590000
** The difference are small:
*** at the end- 90100 (good one) VS 90000 (bad one).
*** in the middle- F018018 vs F010018 .
The issue almost seems like a some kind of security feature that "acts out" from time to time.
Thanks in advance
OutlookLover
I have a random issue where moving a MailItem to a sub-folder (uner the same Exchange Store)
FAILS from time to time.
The real issue is that Outlook stops "seeing" sub-folders under the "\\DRK\DefaultInbox\".
* It basicaly shows the "DefaultInbox" sub-folder to have "zero" sub-folders.
** VBA and VBNET- same phenomemon.
By thwe way, Redemption does not have this issue.
Sample and edited code from slipstick.com :
FolderPath = \\DRK\DefaultInbox\CannoSeeThis"
FoldersArray = Split(FolderPath, "\")
Set oFolder = Application.Session.Folders.item(FoldersArray(0))
If Not oFolder Is Nothing Then
For i = 1 To UBound(FoldersArray, 1)
Dim SubFolders As Outlook.Folders
Set SubFolders = oFolder.Folders <<<< The error will happen here for "DefaultInbox"
Set oFolder = SubFolders.item(FoldersArray(i))
If oFolder Is Nothing Then
Set GetFolderPath = Nothing
End If
Next
End If
I investigated more and it seems that when the issue happens, the EntryId of the "DefaultInbox" folder is WRONG .
It can be seen by the following experiment-
* Just for testing, I requested (Outlook native code) the folder using the CORRECT entryid (and storeid) :
Set ns = Application.GetNamespace("MAPI")
Set oFolder = ns.GetFolderFromID("000000001558C00B64527A4E83C186E33FCE9CCF018018D07E87680CDD48B628CC1483CA3B1B00001BAEBE590100", _
"0000000038A1BB1005E5101AA1BB08002....")
* However, what I got is a folder with a DIFFERENT entryid-
?oFolder.EntryID
000000001558C00B64527A4E83C186E33FCE9CCF010018D07E87680CDD48B628CC1483CA3B1B00001BAEBE590000
** The difference are small:
*** at the end- 90100 (good one) VS 90000 (bad one).
*** in the middle- F018018 vs F010018 .
The issue almost seems like a some kind of security feature that "acts out" from time to time.
Thanks in advance
OutlookLover