# Open with MR Office from Google Drive

Source: https://mroffice.ai/en/developers/cloud/google-drive

Open Word, Excel, PowerPoint and PDF files from Google Drive in MR Office's editors, and save them back to Google Drive as new versions.

## What it does

MR Office opens Word, Excel, PowerPoint and PDF files straight from Google Drive: install MR Office from the Google Workspace Marketplace, then right-click a file and choose Open with → MR Office. The editor opens in a new tab, on the file as it is in Google Drive.

## Permissions

The first time, Google Drive asks you to allow MR Office to see and change only the files you open with it (Google's drive.file permission). MR Office keeps that access on its server, encrypted, and uses it only to read the file you open and to write your saves back; you can remove it at any time in Google Drive's settings.

## Saving

Each save is written back to Google Drive as a new version of the same file, and Google Drive's version history keeps the earlier ones. If someone changed the file while you were editing, your save is still the newest version and their changes stay in the history. The bar above the editor says when a save has reached Google Drive.

## On your own MR Office

Running MR Office yourself? Register an app with Google Drive as below and set its keys on the API.

```text
console:        Google Cloud console (Google Drive API, OAuth consent screen, OAuth client: Web application)
redirect_uri:   https://office.example.com/api/v1/cloud/google/callback
scopes:         openid email https://www.googleapis.com/auth/drive.file
drive_ui_open:  https://office.example.com/api/v1/cloud/google/open
mime_types:     docx xlsx pptx pdf (application/vnd.openxmlformats-officedocument.*, application/pdf)

GOOGLE_DRIVE_CLIENT_ID=…
GOOGLE_DRIVE_CLIENT_SECRET=…
```
