Skip to content

AppleScript Error -1728

For some time I’ve been frustrated by a problem with Automator on my Mac that made a couple of workflows almost impossible to open and change.

These workflows perform multiple find/replace checks on Microsoft Word documents and are very useful. However, the error message would pop up for every entry in these workflows whenever I tried to open them. This meant I had to hit enter every time which, given the number of entries, was tedious to the point that I’d usually give up and force-quit Automator. An example of the error is as follows:

AppleScript Error
Can’t get «class conW» “sheetNum” of «class view» id 545 of «class view» id 544 of «class view» id 6 of «class scrV» id 5 of «class splV» id 4 of «class view» id 3 of «class splV» id 2 of window is 1. (–1728)

Having for some months been resigned to the fact I was effectively locked out of these workflows, I think I’ve identified the problem.

In the Automator actions list for Word, I‘ve discovered that I have two entries of Find and Replace Text in Word Document. More accurately, I have one entry of Find and Replace Text in Word Document, and one of Find and Replace Text in Word Documents. There are differences in the information related to each of these actions, with the one that works having somewhat questionable English. I can’t for the life of me work out why this is. Have I downloaded something from somewhere and don’t remember?

Anyway, changing the action used in the workflows to Find and Replace Text in Word Document seems to have fixed the problem. I get an error even when trying to add Find and Replace Text in Word Documents to a workflow.

Having delved into Macintosh HD/Library/Application Support/Automator to remove any duplicates, I’m surprised to find only one entry of the offending action. And even more perplexing is the fact that the one I can see appears to be the one that’s problematic. I don’t know why this is, but I’m pleased I’ve isolated the issue.

If you’re having similar problems check the actions used in your workflows. I’m not sure whether my problem was the result of upgrading to OS X Lion or my version of Office – possibly neither – but it appears that something has gone awry at some point. To avoid similar issues in future, the next time I buy a new Mac I think I’ll be starting afresh rather than using Migration Assistant as I have on every previous occasion.

Tweet me.


Get every new post delivered to your Inbox.