title: Error 438 when using GetConversation on a mail item
body: <p>I'm trying to export all e-mails in a shared inbox to excel. I'm specifically interested in how many conversations I've had, rather than all e-mails I've received. </p>
  
  <p>I'm getting the <code>438 error</code>  on the <code>Set conv = Item.GetConversation()</code> line: </p>
  
  <blockquote>
    <p>Object doesn't support this property or method.</p>
  </blockquote>
  
  <p>This implies that Item doesn't support GetConversation, even though it is a function for a MailItem.</p>
  
  <pre><code>    Public Sub ExportToExcel()
          Dim objOL As Outlook.Application
          Dim objNS As Outlook.NameSpace
          Dim SubFolder As Object
          Dim MailFolder As Object
          Dim SharedInbox As Outlook.MAPIFolder
          Dim objRecip As Outlook.Recipient
  
          Dim Item As Object
          Dim conv As Object
          Dim store As Outlook.Store
  
          Dim xlApp As New Excel.Application
          Dim xlWB As Excel.Workbook
          Dim i As Long
          Dim ArrHeader As Variant
  
          On Error GoTo MsgErr
  
          Set objOL = Application
          Set objNS = objOL.GetNamespace("MAPI")
          Set objRecip = objNS.CreateRecipient("sharedmailbox@outlook.com")
          Set SharedInbox = objNS.GetSharedDefaultFolder(objRecip, olFolderInbox)
  
          Set MailFolder = SharedInbox.Folders("Archive").Folders("Sub")
  
  
          ArrHeader = Array("Category", "Date Sent", "Subject", "Mails in conversation")
  
          Set xlApp = CreateObject("Excel.Application")
          xlApp.Visible = True
          Set xlWB = xlApp.Workbooks.Add
  
  
          xlWB.Worksheets(1).Range("A1").resize(1, UBound(ArrHeader) + 1).Value = ArrHeader
  
          For Each SubFolder In MailFolder.Folders
              For Each Item In SubFolder.Items
                  If (Item.Class = olMail) Then
                      store = SubFolder.store
  
                      If (store.IsConversationEnabled) Then
                          Set conv = Item.GetConversation()
  
                          If (conv &lt;&gt; Null) Then
                              xlWB.Worksheets(1).Cells(i + 1, "A").Value = SubFolder.Name
                              xlWB.Worksheets(1).Cells(i + 1, "B").Value = Item.ReceivedTime
                              xlWB.Worksheets(1).Cells(i + 1, "C").Value = Item.Subject
                              xlWB.Worksheets(1).Cells(i + 1, "D").Value = conv.GetTable().getrows()
                          End If
                      End If
                  End If
              Next Item
          Next SubFolder
  
          xlWB.Worksheets(1).Cells.EntireColumn.Autofit
  
      MsgErr_Exit:
          Set emailSourceFolder = Nothing
          Set emailDestFolder = Nothing
          Set objNS = Nothing
          Set objOL = Nothing
          Set SubFolder = Nothing
          Set MailFolder = Nothing
          Set SharedInbox = Nothing
          Set objRecip = Nothing
          Set Item = Nothing
          Set conv = Nothing
          Set Store = Nothing
          Set xlWB = Nothing
          Set xlApp = Nothing
          Set i = Nothing
          Set ArrHeader = Nothing
  
          Exit Sub
  
      '// Error information
      MsgErr:
          MsgBox "An unexpected Error has occurred." _
               &amp; vbCrLf &amp; "Error Number: " &amp; Err.Number _
               &amp; vbCrLf &amp; "Error Description: " &amp; Err.Description _
               , vbCritical, "Error!"
          Resume MsgErr_Exit
  
      End Sub
  </code></pre>