title: Run-time error 430: Class does not support automation or does not support expected interface"* error while looping through mails in Outlook
body: <p>I am trying to loop through emails in outlook to get the &quot;ConversationTopic&quot; for each mail.</p>
  <p>I have written the excel VBA code as below and for some reason it will have this <em>&quot;Run-time error 430: Class does not support automation or does not support expected interface&quot;</em> error. <strong>The code is able to loop through around 1000 emails before having this error</strong>. It did not error out immediately during the start of the loop. It will stopped at the line:</p>
  <pre><code>Debug.Print counter &amp; vbTab &amp; outlook_mail.class &amp; vbTab &amp; outlook_mail.ConversationTopic
  </code></pre>
  <p>If i changed the line as such it would not have any issue looping through the mail</p>
  <pre><code>Debug.Print counter &amp; vbTab &amp; outlook_mail.class
  </code></pre>
  <p>OR</p>
  <pre><code>Debug.Print counter
  </code></pre>
  <p>The error will only appear if this is added</p>
  <pre><code>outlook_mail.ConversationTopic
  </code></pre>
  <p>I've tried to google for a solution I could not find any for this error where the code stopped halfway while running.</p>
  <p>Remark: The reason I used latebinding is to ensure all users in my office is able to use the script.</p>
  <pre><code>Sub latebinding()
  
  Dim OutlookApp As Object
  Set OutlookApp = CreateObject(&quot;Outlook.Application&quot;)
  
  Dim Outlook_namespace As Object
  Set Outlook_namespace = OutlookApp.GetNamespace(&quot;MAPI&quot;)
  
  Dim Outlook_folder As Object
  Set Outlook_folder = Outlook_namespace.GetDefaultFolder(6)
  
  Dim outlook_item As Object
  Set outlook_item = Outlook_folder.Items
  
  Dim outlook_mail As Object
  Set outlook_mail = OutlookApp.CreateItem(0)
  
  Dim outlook_attachment As Object
  Set outlook_attachment = outlook_mail.Attachments
  
  Dim counter As Integer
  counter = 1
  For Each outlook_mail In outlook_item
      If TypeName(outlook_mail) = &quot;MailItem&quot; Then
         Debug.Print counter &amp; vbTab &amp; outlook_mail.class &amp; vbTab &amp; outlook_mail.ConversationTopic
      End If
  counter = counter + 1
  Next outlook_mail
  
  Set OutlookApp = Nothing
  Set Outlook_namespace = Nothing
  Set outlook_attachment = Nothing
  Set Outlook_folder = Nothing
  Set outlook_item = Nothing
  Set outlook_mail = Nothing
  
  End Sub
  </code></pre>