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

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 "\\ACME\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
 

outlooklover

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Using: Outlook for Office 365 MSO (ver 16.0.11929.20708) 32 bit
 
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 2
V Outlook 2003 OpenEntry - Exchange Client Extension API Outlook VBA and Custom Forms 2
Travis Lloyd Messages Won't Display In Outlook 2019 Home & Business Using Outlook 0
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 1
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 6
P i-Phone 6s Plus receiving 2 notifications from Outlook email Using Outlook 1
C WARNING - DO NOT USE AN OUTLOOK.COM ADDRESS FOR GOOGLE ACCOUNT RECOVERY EMAIL Using Outlook 10
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 3
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 Outlook.com premium finally dying... what do I do with my domain? Using Outlook.com 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 Outlook.com accounts in Outlook 3
M Issue transferring Outlook 2016 email accounts & settings onto new computer Using Outlook 8
S Excel vba code to manage outlook web app Using Outlook 10
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
P Outlook 2013 Calendar Archiving Using Outlook 0
D Connecting Gmail to Outlook 365 - My Setup not working Using Outlook 2
K Outlook tasks formatting Using Outlook 4
G Retention Policy for Outlook.com Deleted Items folder Using Outlook 0
S Problem Checking the available stores in my Inbox (Outlook VBA) Outlook VBA and Custom Forms 0
V Is it possible to collect statistics from Outlook forms? Outlook VBA and Custom Forms 1
Z Outlook 365 delete reminder you can’t make change to contents of this-read only folder Using Outlook 4
H I have no profile listed for Outlook! Using Outlook 9
S Outlook VBA How to adapt this code for using in a different Mail Inbox Outlook VBA and Custom Forms 0
S Macro for Loop through outlook unread emails Outlook VBA and Custom Forms 2
D Outlook 2016 how to use gmail account as source account for outlook 365 Using Outlook 9
Horsepower Contacts added from iPhone don't show up in Outlook Using Outlook 2
F Microsoft Outlook Connector 14.0.6123.5001 - Help! Using Outlook 6
A Outlook (and Office) 2019 Logging Using Outlook 2
glnz Can Word Normal.dotm interfere with Outlook? Office 2016 Using Outlook 5
D Outlook 2016 and Earlier with Office365 in 2021 Using Outlook 3
glnz Moving from Outlook 2003 to MS365 Outlook - need basics Using Outlook 4
L Outlook saved template function too limited Using Outlook 2
C Looking for feedback on new Outlook Add-in Using Outlook 0
M Outlook on 3 Computers Shows Different Total Items on Same Account Using Outlook 3
S Outlook email to configure setup for each mail Outlook VBA and Custom Forms 1
witzker print-list-of-outlook-folders with sort posibility Outlook VBA and Custom Forms 7

Similar threads

Top