Save command in CS6

Hi Chaps

this used to work


tell application "Adobe Photoshop CS6"
	--activate
	
	--do action "email advert" from "misc"
	set docref to current document
	
	save docref in AdFolder as JPEG with options {quality:6} with replacing
	--close current document
end tell

It now does not.
Result:
error “Adobe Photoshop CS6 got an error: Can’t get document "Advert Facebook".” number -1728 from document “Advert Facebook”
The document has the correct name. When asked i.e. get name of current document ) Applescript will return the name of the document but not when when this script is running
Any ideas why
Os 10.7.4
CS6

This now works


set myFile to "Clarks Laptop:Users:JCLAPTOP:Desktop:test1:"

tell application "Adobe Photoshop CS6"
	make new document
	
	set myOptions to {class:JPEG save options, quality:12}
	save current document in myFile as JPEG with options myOptions 
end tell

CS6 has got fussier. The reference cannot be an alias and it needs the full reference to the class to work {class:JPEG save options, quality:12}
Thanks for looking