title: Installing / running a script in a Google Docs Document (not Spreadsheet)?
body: <p>The API documentation states </p>
  
  <blockquote>
    <p>Use DocumentApp.getActiveDocument() to access the document that is
    currently opened by the user, if there is one (null is returned
    otherwise). An active document will be available if (and only if) the
    current script is installed (or otherwise saved) in the scope of an
    existing document.</p>
  </blockquote>
  
  <p>So far I am able to install a script in a Spreadsheet and manipulate any Document with it but I wonder if it is possible to install the script directly in the Document. This would have the advantage of having the script menu right where it is needed. The spreadsheet solution seems like a strange workaround to me.</p>