Google Drive – How to Automatically Open Google Docs Above a Certain Age in Viewing Mode

google docsgoogle sheetsgoogle-apps-scriptgoogle-drivegoogle-slides

Sometimes, I like to go back into my old school files and read the terrible essays I wrote in high school. However, on occasion, I will accidentally hit a key while reading, and this changes the edit date to way after the date on which I last worked on the document.

Google Docs, Sheets, and Slides have three view modes: Editing, Suggesting, and Viewing. The first two cause the file to accept input, which changes the edit date. Viewing Mode, however, displays the file in a read-only state, making it impossible to make (or suggest) changes accidentally.

Since I see many of my old Google-format files as "archived" in my Drive—heck, I have a massive folder named "Archive"—I would love to be able to open files last edited before a certain elapsed time—say, a year ago—in Viewing Mode so as to protect them from twitchy typing fingers.

Is there a way to enact this behavior using Apps Script? or some other way? Or do I just need to back away from the keyboard and mouse any time I want to read an old document or spreadsheet?

Best Answer

Short answer

Google Apps Script can't modify how the Google Drive UI behaves, but it already has features to open file on preview mode.

Alternatives

To open a file of the Google Docs editors type in preview mode,

  • Alternative 1: Right click the file and select Preview
  • Alternative 2: Select the file and click the preview button on the Google Drive toolbar

Preview - Google  Drive Toolbar