title: Application Object "Out Of Range" Error Initializing Legacy VB6 COM-Addin for Outlook 2013
body: <p>I'm attempting to ensure compatibility for an old VB6 COM-addin for Outlook 2013.  It's worked fine (more or less) for every version since 2002 but in testing 2013 I'm getting an odd error when I attempt to initialize.  </p>
  
  <p>As soon as I try to take ANY action on the Outlook Application object I blow up with a <b>"09 - Subscript Out Of Range"</b> error.  Even something as benign as casting the the olApp parameter I'm bringing into the class as a private var blows up.  The Application object isn't null, it's property rich and seemingly initialized. </p>
  
  <pre><code>Friend Sub InitHandler(olApp As Outlook.Application, strProgID As String)
  
  On Error GoTo ErrorExit
  
  'If Outlook is opened without main UI (i.e. 'mailto:' HTML link)
  If Explorers.Count = 0 Then Exit Sub
  
  ' BLOWS UP SO TRIED COMMENTING IT OUT AND ACCESSING PARAMETER DIRECTLY
  'Set objOutlook = olApp
  
  ' ALSO BLOWS UP
  Set objNameSpace = olApp.GetNamespace("MAPI")
  
  ...
  </code></pre>
  
  <p>Have there been any major architectural changes to the object model?  Any ideas?</p>