The Outlook API wrongfully shows an outlook folder to have zero sub-folders

Status
Not open for further replies.

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 asked Dimtry (Redemption author) about it - he said this:

I have seen similar issues with Outlook losing the Drafts folder – everything looks normal, but inline replies break: select a different message, come back, but the inline response is silently gone. And GetDefaultFolder(olFolderDrafts) raises an exception. Outlook restart helps.

And you can’t compare the entry ids one bit at a time: there are some flags inside, but OutlookSpy parses them:

abFlags[0]: 00

abFlags[1]: 00

abFlags[2]: 00

abFlags[3]: 00

muid: 5E81754F003E1549B0659F2AEA92E7C2 ({4F75815E-3E00-4915-B065-9F2AEA92E7C2})

Type: 0x0001 (eitLTPrivateFolder)

DatabaseGUID: C7CF2304C77BF64585E8892DD6FF7BAC ({0423CFC7-7BC7-45F6-85E8-892DD6FF7BAC})

GlobalCounter: 0xB62000000000

Pad: 0x0000
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
O The Outlook API wrongfully shows an outlook folder to have zero sub-folders Outlook VBA and Custom Forms 1
V Outlook 2003 OpenEntry - Exchange Client Extension API Outlook VBA and Custom Forms 2
C I don't understand Outlook or Microsoft, anymore Using Outlook 1
P My Feedback to Microsoft and their response; also New Outlook roadmap Using Outlook 0
A New Outlook - Cannot drag IMAP emails to Task List in MyDay Using Outlook 1
L Android Outlook Doesn't Update PC Notification Changes Using Outlook 0
A How to open Excel file saved in Outlook folder? Outlook VBA and Custom Forms 4
D.Moore Outlook desktop client suggested searches question Using Outlook 22
Y Outlook 2016 (64-bit) Copy Local Cal. Events to Another Cal. with Modified Reminder time Using Outlook 2
T Outlook 2019 While connecting an IMAP account in "classic" Outlook 2024 I caused a massive duplication of emails on the server (death loop) Using Outlook 5
D Cannot logon to Outlook.com, or outlook on Mac, outlook not updating on ipad, iphone Using Outlook 1
J unable to get my new install of Outlook to display mailboxes in the single-line format. Using Outlook 1
D Legacy Microsoft Outlook for Mac Support will end in Oct 2025 Using Outlook 5
C Nasty Bug Lurking In Outlook For Years. The Trigger. Any Fix Or Workaround? Using Outlook 11
R Auto clicking Hyperlink in outlook Outlook VBA and Custom Forms 7
ughlook Open multiple contacts in NEW Outlook? Using Outlook 3
G Outlook translation feature is off Using Outlook 2
J Outlook 2010 does not let me put any account Using Outlook.com accounts in Outlook 3
P 3 of 5 PST files don't install from d:\outlook but only from D:\ Using Outlook 7
HarvMan January Windows 10 preview update force installs new Outlook Using Outlook 1
L Outlook 2010 - new installation on Windows 11 - aplzod32.dll is not a valid Add-in Using Outlook 12
J Outlook troubleshooting/logging - option grayed out Using Outlook 2
B Arrows missing from Outlook emails vertical scrollbar Using Outlook 0
G Outlook 2021 (New) doesn't respect default browser Using Outlook 9
B Outlook or iPhone turning tabs into spaces in Outlook Notes Using Outlook 1
P newly installed Office 365 includes OLD Outlook Using Outlook 6
R Outlook ribbon menu default? Using Outlook 7
H Spam email in Gmail not visible in Outlook Using Outlook 3
J How to transfer Win 10 Outlook to new Windows 11 pc? Using Outlook 16
J Renegade spam URL line displayed in old local Outlook 365 email title Using Outlook 3
G Reduce whitespace in Outlook desktop Contact Cards display Using Outlook 3
C Outlook classic via 365 Using Outlook 2
Dr. Demento Analogous Outlook code to read info into an array (or collection or whatever) Outlook VBA and Custom Forms 7
S Repair Outlook Using Outlook 8
V Outlook Form ListBox is not editable Outlook VBA and Custom Forms 2
F Outlook's contacts Using Outlook 1
D Outlook 2003 stopped dead Using Outlook 2
G Cannot receive emails from gmail account in Outlook 365 Using Outlook 1
E "Cannot display the folder. MS Outlook cannot access the specified file location" Using Outlook 8
P Outlook 2016 Working Offline Using Outlook 2
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 11
O Outlook 365 synchronisieren Exchange Server Administration 1
kburrows Outlook Classic - JPG files are corrupted when opened or saved Using Outlook 3
F Sync Outlook Calendar Using Outlook 0
G Change default font size in sticky notes - Outlook Desktop 2021 Using Outlook 2
C VBA in "New Outlook?" Using Outlook 0
D New Outlook with Business Basic Plans Using Outlook 0
D Outlook 2021 not working with Outlook 2003 installed Using Outlook 5
D Outlook 2003 stopped working - get they dialog box asking for username & Password Using Outlook 2
T Outlook 2021 hangs in close on taskbar occasionally Using Outlook 1

Similar threads

Back
Top