title: Move a conversation from a shared mailbox into a folder within the shared mailbox
body: <p>We have a shared mailbox (test@) with a subfolder (TestIn).</p>
  <p>I want to choose an email in the inbox of the shared mailbox and move it to the &quot;TestIn&quot; folder.</p>
  <p>This mail should be moved as conversation, not only the single mail, every mail under this Header (conversation) should go into this folder.</p>
  <p>We are working with Office365 and Microsoft Exchange Accounts in Outlook.</p>
  <p>I got it working to move the selected message (or conversation) from the shared mailbox into a subfolder of the personal mailbox, not the shared one.</p>
  <p>Here's the code:</p>
  <pre><code>Sub SetAlwaysMoveToFolderMAPI()
  Dim sharedemail As Outlook.Recipient
  Dim myOlApp As New Outlook.Application
  Dim myNameSpace As Outlook.NameSpace
  Dim myInbox As Outlook.MAPIFolder
  Dim myDestFolder As Outlook.MAPIFolder
  Dim myMail As Outlook.MailItem
  Dim myStore As Outlook.Store
  Dim oConv As Outlook.Conversation
  
  Set myNameSpace = myOlApp.GetNamespace(&quot;MAPI&quot;)
  Set sharedemail = myNameSpace.CreateRecipient(&quot;Postfach Test&quot;)
  Set myInbox = myNameSpace.GetSharedDefaultFolder(sharedemail, olFolderInbox)
  Set myDestFolder = Application.Session.GetDefaultFolder(olFolderInbox).Folders(&quot;TestIn&quot;)
  Set myMail = ActiveExplorer.Selection(1)
  Set myStore = myDestFolder.Store
  
  If myStore.IsConversationEnabled Then
   Set myConv = myMail.GetConversation
   If Not (myConv Is Nothing) Then
    myConv.SetAlwaysMoveToFolder myDestFolder, myDestFolder.Store
   End If
  End If
  End Sub
  </code></pre>
  <p>If I replace</p>
  <pre><code>Set myDestFolder = Application.Session.GetDefaultFolder(olFolderInbox).Folders(&quot;TestIn&quot;)
  </code></pre>
  <p>with</p>
  <pre><code>Set myDestFolder = myNameSpace.GetSharedDefaultFolder(sharedemail, olFolderInbox).Folders(&quot;TestIn&quot;)
  </code></pre>
  <p>it doesn't move anything and I don't get any error message.</p>
  <p>If I debug I see, that the script is jumping from <code>If myStore.IsConversationEnabled Then</code> straight to the end.</p>
  <p>For me this means, the <code>If myStore.IsConversationEnabled Then</code> is the problem, but I can't find anything about it.</p>