It's possible to edit an existing document. You must only put the following.
To save file in another server, you must capture event on click in the frame and if yoy want to create new, you must create the file on gmail server then download on to your server.