title: I get an object does not support method error when code that is listed tested
body: <pre><code>Sub test()
  
      Dim Tbl As Table
      Set Tbl = ActiveDocument.Tables(1)
  
      Tbl.Cell(2, 2).Range.InlineShapes.AddPicture &quot;C:\users\user\desktop\Flower1.jpg&quot;
      Tbl.Cell(2, 2).Range.InlineShapes(1).Select
      Selection.InsertCaption Label:=&quot;Figure&quot;, Title:=&quot; : Caption Flower 1&quot;, _
                              Position:=wdCaptionPositionBelow
  End Sub
  </code></pre>
  <p>Used in Excel(MS365), VBA code is used to create a word document and inserts a table. Picture is inserted but the code fails at the Selection.InsertCaption method (Error 438, object doesn't support this method). I am not a fan of using selection but the cell(2,2).range.insertcaption puts the caption below the table instead of below the picture in the cell.</p>