Copy function is not available in Photoshop CS5.
i am facing above issue in Photoshop scripting
This error in normally due to an error in your code, no one will be able to help you without seeing what code you are using.
What PR said. Error 8800 is the generic "Something's wrong and we can't really give you any more detailed information."
Post your code that causes the problem...