An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

January 10, 2009

Copy Google Documents to Your Account

Someone sent me the link to a document published using Google Docs, but I didn't have the permission to edit the document. I wanted to save the document to my Google Docs account, but none of the options offered by Google allowed me to do that.

One of the ways you could create a duplicate for the document is to replace

http://docs.google.com/View?docid=AAAAA

with

http://docs.google.com/DocAction?action=copy&docid=AAAAA

where AAAAA is the document ID.

To automate the process, I created a small user script that adds an option to duplicate the document. The script works in:

* Firefox, if you install Greasemonkey
* Chrome, if you install the latest pre-beta version
* Opera (no add-on required)
* Safari, if you install GreaseKit
* Internet Explorer, but you need to install a plug-in like IE7Pro

Here's a sample document to try it. After installing the script, open the document, scroll to the bottom of the page and click on "Copy to my account".


Another idea is to upload the document to Google Docs, but you need to edit the URL to remove the footer and add the .html extension. Replace

http://docs.google.com/View?docid=AAAAA

with

http://docs.google.com/View?docid=AAAAA&hgd=1&.html

Related:

Download published documents and spreadsheets
Tips for linking to Google presentations

20 comments:

  1. What if they only gave you view permission for a reason? Maybe you weren't intended to edit it? An increasing number of companies and organisations seem to use Google Docs for internal editing and collaboration of things, and then publish to the web as a readonly thing. It is dangerous to allow these things to be copied by anyone and edited in any way they like (I know that could happen with HTML as well, but Google Docs is a bit more immediate).

    ReplyDelete
  2. Great, it works perfectly. with chrome. Just a question, why do not propose this function only to google doc and not every web page ?

    ReplyDelete
  3. Jon, if your copy protection scheme is effectively relying on people being to stupid to work out how to save a html file, then you deserve everything you get.

    ReplyDelete
  4. I think this is great article that this author brought up! Thanks a lot!

    And, Jon Morgan, the idea behind this is not to hack some privacy and mess up everything but lets people know about its weakness and enhance it. Information is very powerful and it's better if it's shared.

    ReplyDelete
  5. OT: It seems we can not see posts after "post 200" in the faveicon thread. There is no button to switch to page two of comments?

    ReplyDelete
  6. @Wilhelm:
    That's a known limitation for Blogger's classic templates. Here's the comment page with pagination.

    ReplyDelete
  7. Did anyone read the story (text)? Who is this Zhang person--just curious. ;)

    ReplyDelete
  8. @ Jon

    Or they could take a screenshot and OCR it! My God! Or just rewrite it from their eyes!

    People used to even retell stories that they only heard once or twice, I hear.

    ReplyDelete
  9. I need a similar workaround to save PDFs that are attached to Gmail messages and "viewed" rather than downloaded. The view is a Google Docs view, but with no button to save directly to your account.
    The url is in this form:
    http://docs.google.com/gview?attid=0.1&thid=AAAAA&a=v
    You can always go back to the Gmail message, download the PDF, then upload to Docs, but wouldn't it be easier just to paste something into the URL?
    Thanks.

    ReplyDelete
  10. I'd like something like that too.

    ReplyDelete
  11. What about a bookmarklet? That would rock =)

    ReplyDelete
  12. Anyone else notice this only works with documents and not spreadsheets or anything else? The article is misleading in that it seems to indicate this trick is useful for all of Google Docs.

    ReplyDelete
  13. What's misleading about "Google Documents"? Not spreadsheets, not presentations, just documents.

    ReplyDelete
  14. Can't run it on chrome 2.0.159.0 (started with --enable-user-scripts, with 40220.user.js in "C:\Documents and Settings\(me)\Local Settings\Application Data\Google\Chrome\User Data\Default\User Scripts\")

    Am I missing something?

    ReplyDelete
  15. sadly no longer works...

    ReplyDelete
  16. the "newcopy" url option works for spreadsheets such as http://spreadsheets.google.com/ccc?key=pnLDJiBKx5IjC0M6ulfgTDg&newcopy

    ReplyDelete
  17. no longer works - any workarounds?

    ReplyDelete