skip to Main Content

Fixing My Broken AutoCrat

I am awful about keeping up with what becomes deprecated by Google (DocsList is now gone and DriveApp must be used instead). Today, some of our district workflow threw errors because we are still using AutoCrat v4.5.5 (4/12/14). I will update over the summer, but for right now, I just wanted to get this installation of the script working. I headed over to the Google Group for Apps Script Issues and found the answer. I am sharing here in hopes it may save you all some searching.

First, make a copy of your sheet (just in case).

If you need help finding out if you are using the same version of AutoCrat as we are, here is how to find that AND how to get to the Script Editor.

version-autocrat-2Click image to view larger version in a new window.
 

In order to fix the script, you are going to be making changes to the code. PROCEED AT YOUR OWN RISK!

Click on the link to AutoCrat in your Script Editor window. It will look like this. Note: the left sidebar lists all the files it takes for AutoCrat to work its magic. 

AutoCrat 1

The Script Editor has a Find & Replace feature which can be found under the Edit menu. NOTE: I get a little nervous doing mass Find & Replace so I used the Find and then made the changes manually.

Find

Here are all the things you need to fix:

  • Replace all instances of docsList with DriveApp
  • Replace all instances (with quotes) of “document” and “DOCUMENT” with MimeType.GOOGLE_DOCS (no quotes)
  • Replace all instances of getFileType with getMimeType
  • Replace all instances of file.addToFolder(folder) with folder.addFile(file) – NOTE: Instead of having the word folder inside the parentheses, I had secondaryFolder so look for that one as well.
  • Replace all instances of file.removeFromFolder(DriveApp.getRootFolder()) to DriveApp.removeFile(file);
  • Replace all instances of pdfFile.removeFromFolder(DriveApp.getRootFolder()) to DriveApp.removeFile(pdfFile);

Save the changes in the Script Editor and try running your AutoCrat merge again.

This worked for me. I hope it works for you as well.

This Post Has 2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top