cancel
Showing results for 
Search instead for 
Did you mean: 

Access subfolder in shared mailbox failed (Mapiex)

RenéGraf
Level 2
Hi all I try to access a subfolder within a shared mailbox in Outlook. The connection to the message storage form this shared mailbox works fine. But I struggle with accessing a subfolder within this shared mailbox. Here the code I use (extracted from Mapiex VBO):     Dim SharedMailboxName As String = "\\examplemailbox"     Dim SubFolder As String = "testfolder"     'Initialise the extended MAPI interface     Using mapi As New NetMAPI()     'log into mapi     mapi.Login(Profile)     'Connect to Shared Mailbox     If Not mapi.OpenMessageStore(SharedMailboxName) Then Throw New MAPIException("Failed to access message store")     'Access the subfolder     If Not mapi.Opensubfolder(SubFolder) Then Throw New MAPIException("Failed to access the subfolder") When I run this I always get the error "Failed to access the subfolder". What I am doing wrong? Should I set subfolder with something like "\\examplemailbox\subfolder" or something like this? I tried already different constellations. I really hope somebody can help me in this case. Many thanks in advance Kind Regards, René      
2 REPLIES 2

RenéGraf
Level 2
oh, just got it :). Before trying to open the subfolder I first need to open the Inbox anyway. I thought this is not needed when I want to access a subfolder :         'Open Inbox         If Not mapi.OpenInbox() Then Throw New MAPIException(""Failed to access inbox"") Best regards

DavidRubiano
Level 5
Can you export this VBO?