title: In Google sheets how can I Script the manipulation of the default Zoom?
body: <p>I would like to write a script that I can apply to a shared sheet that automatically changes the zoom level of the sheet (not the browser window) to 75% when the sheet is opened.</p>
  
  <p>The script that I cobbled together has it's own issues with deprecated UserProperties commands that I'm trying to fix on the side, but adding the function to alter the zoom would be very helpful in the mean time while I work that out. Any help afforded would be greatly appreciated!</p>
  
  <p>Mark</p>
  
  <p>Current script is below: This is used to choose the last modified sheet, and navigate to that cell (clunkily:</p>
  
  <pre><code>function setTrigger() {
    var ss = SpreadsheetApp.getActive();
    ScriptApp.newTrigger("myFunction").forSpreadsheet(ss).onEdit().create();
  }
  
  function myFunction() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var sName = sheet.getName();
    var currentCell = sheet.getActiveCell().getA1Notation();
    Utilities.sleep(1000);
    UserProperties.setProperty("mySheetName", sName).setProperty("mySheetName", sName);
    Utilities.sleep(1000);
    UserProperties.setProperty("myCell", currentCell);
    Utilities.sleep(1000);
  }
  
  function onOpen() {
    var lastModifiedSheet = UserProperties.getProperty("mySheetName");
    Utilities.sleep(1000);
    var lastModifiedCell  = UserProperties.getProperty("myCell");
    Utilities.sleep(1000);
    SpreadsheetApp.getActiveSpreadsheet().getSheetByName(lastModifiedSheet).getRange(lastModifiedCell).activate();
  }
  </code></pre>