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


New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

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 :
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
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", _

* However, what I got is a folder with a DIFFERENT entryid-


** 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


Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
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
O Outlook - hidden contacts? Using Outlook 2
F Outlook 365 is "Possessed" Using Outlook 2
e_a_g_l_e_p_i Can someone explain syncing with Outlook and Gmail Using Outlook 3
K Outlook Office 365 VBA download attachment Outlook VBA and Custom Forms 2
e_a_g_l_e_p_i Gmail in Outlook 2010 preview issue Using Outlook 4
I Outlook is stuck at "Updating Calendar" Using Outlook 1
AmonRa Outlook 365 calendar - too much white space Using Outlook 0
e_a_g_l_e_p_i Outlook 2010 Help setting up Gmail account in Outlook 2010 Using Outlook 3
C-S-R How to clear an Outlook (To Do) Task Flag? Using Outlook 8
N How do I make Outlook autocomplete addresses from a list of recognised <full_names> only? Using Outlook 2
P Outlook 2019 UI changes after 20H2 update Using Outlook 1
R How to restrict GWSMO sync to Outlook Send/Receive cycles Using Outlook 0
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
S Outlook 2007 crash linked to gdiplus.dll Using Outlook 0
P Sending email from outlook IMAP to GMAIL where embedded images are added as attachment Using Outlook 1
M Outlook 2010 How could I globally redesign an outlook template form/region/inspector template used to display mail lists or an individual mails? Outlook VBA and Custom Forms 0
T The Linked Image Cannot Be Displayed in Outlook Using Outlook 5
M Outlook 2010 Outlook 2010 with O365 / Exchange Online Using Outlook 0
S Outlook 2016 Change how Outlook shows me contacts in emails Using Outlook 0
A OutLook For Mac 16.46 Comes Up In Small Window When Opening Using Outlook 4
S Outlook 2007 - Automatic purge fail Using Outlook 0
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
V vBA for searching a cell's contents in Outlook and retrieving the subject line Outlook VBA and Custom Forms 1
B vBA for exporting excel file from outlook 2016 Outlook VBA and Custom Forms 3
Horsepower Moving emails between folder Outlook for Mac Outlook Wishlist 8
Travis Lloyd Messages Won't Display In Outlook 2019 Home & Business Using Outlook 0
J Outlook 2019 i dont want to buy the snake oil ost to pst programs Using Outlook 1
B Outlook 2016 Outlook crashes when trying to print certain emails Using Outlook 5
T Outlook Template - textbox visible based on combobox selection Using Outlook 1
D We're sorry but outlook has run into an error Using Outlook 6
F Outlook 2010 Outlook 2010 and GMail Using Outlook 0
M Reverting The Outlook Search Box Location (or other undesired additions) Using Outlook 1
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
P i-Phone 6s Plus receiving 2 notifications from Outlook email Using Outlook 1
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
M White square in body of Outlook Messages (O2016 Version 2012 32bit Click To Run) Using Outlook 4
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1
R Why doesn't outlook use "Normal" style for new messages? Using Outlook 4
D Outlook 2016 Outlook not saving Sent Items Using Outlook 4
R How to Sync *all* Google Workspace Mail Folders with Outlook 2019 (MS365) Using Outlook 3
G Outlook 365 with iCloud account not syncing calendars Using Outlook 2
D Outlook 2016 Outlook Error Msg "The operation cannot be performed ..." How to Stop it Using Outlook 3
D premium finally dying... what do I do with my domain? Using accounts in Outlook 3
witzker Outlook 2019 is cutting Picture Extension *.pn_ Using Outlook 3
S Is there a free version of outlook? Using Outlook 0
peterbata Shared Tasks Outlook for Mac Using Outlook 3
L Ideas for Setup with New Office 365 Family Subscription (Outlook) Using accounts in Outlook 3

Similar threads