There is a nice article about sheeping macros in the wiki!

Link

maybe it helps you