title: How to send AutoCAD Commands through VBA?
body: <p>I'm trying to do the following but through VBA:</p>
  
  <ol>
  <li>Open Object</li>
  <li>Send CTRL+0 (_CleanScreenON)</li>
  <li>Send MouseClick * 2 = (._ZOOM All)</li>
  <li>Save and close document returning to Access.</li>
  </ol>
  
  <p>But really, all I need to understand is how to open a drawing and send commands to it. I haven't been successfull.</p>
  
  <p>I'm aware of the <a href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/AutoCAD-ActiveX/files/GUID-9216BFCD-D358-4FC6-B631-B52E6693D242-htm.html" rel="nofollow noreferrer">AutoCAD Document Object Documentation</a> and I've experimented with <em>SendCommand</em> and <em>PostCommand</em> but I'm getting <strong>Object doesn't support Automation</strong> errors... Can someone shed some light on what I'm doing wrong?</p>
  
  <p>Thanks in advance, Rafael.</p>
  
  <p>EDIT:
  This is the code I was experimenting with:</p>
  
  <pre><code>Private Sub CenterDWG_Click()
  'Me.DrawingFrame.Object.Open
  Me.DrawingFrame.Object.SendCommand ("_CleanScreenON")
  Me.DrawingFrame.Object.SendCommand ("._ZOOM All")
  'Me.DrawingFrame.Object.Regen acAllViewports
  End Sub
  </code></pre>