title: How can I find out about undocumented .NET / COM library functions?
body: <p>How can I find out the properties and methods of COM objects returned from some .NET functions, which do not appear to be documented?</p>
  
  <p>In the particular example I'm looking at, I'm inserting a picture into Excel using a function like:</p>
  
  <pre><code>Set NewPic = ActiveSheet.Pictures.Insert(FileName)
  </code></pre>
  
  <p>(See the SO post on this <a href="https://stackoverflow.com/questions/521979/is-is-possible-to-insert-an-image-into-an-excel-cell-via-com">here</a>.)</p>
  
  <p>However, the <a href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.pictures.aspx" rel="nofollow noreferrer">MSDN documentation</a> for this function only says that Worksheet.Pictures returns an Object, and when I put a watch on the variable during debugging its type is System.__ComObject. Can I find out what other properties and functions might be available for that class (for example, I want to modify the alternative text for the picture)? How would the person who found out about the <code>Insert</code> function even have known about it?</p>
  
  <p>The MSDN doc also tends to say of such functions that they are "not intended to be used directly from your code", but let's ignore that for now...</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>Edit:</strong> Well, I managed to answer my specific question at least. Instead of using <code>Worksheet.Pictures.Insert</code>, you can use <code>Worksheet.Shapes.AddPicture</code> to return a proper (documented) Excel.Shape class:</p>
  
  <pre><code>pic = range.Worksheet.Shapes.AddPicture(tmpFile, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, range.Left, range.Top, image.Width, image.Height)
  pic.AlternativeText = "Help!"
  </code></pre>
  
  <p>Would still be interested in any resources for undocumented functions though.</p>