title: How to pull text from a shape in a Word document using VBA?
body: <p>I'm trying to grab the text from inside a shape on a Word document.</p>
  
  <pre><code>Sub textgrab()
    MsgBox ActiveDocument.Shapes("Rectangle 85").TextFrame.TextRange.Text
  End Sub
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>Run-time error '-2147024809 (80070057)':<br>
    The item with the specified name wasn't found.</p>
  </blockquote>
  
  <p>In the Word document when I go to the top menu, hit the shape format tab, and in the arrange section, I select 'selection pane', I get a list of all the shapes, 'Rectangle 85' is there.</p>
  
  <p>When I select it, it highlights the box i'm trying to grab the value from.</p>
  
  <p>This is a pdf that I've opened in Word. I'm trying to automate a process that will open a pdf invoice, grab the dollar total, and pull it into Excel.</p>