This can be done using VBA.
However, please post your questions in Mac Newsgroups, there are many example that might helpful
Mac Newsgroups
http://www.microsoft.com/mac/community/community.aspx?pid=newsgroupshttp://groups.google.com/group/microsoft.public.mac.office/topics
Thank you and have a great day.
Sincerely,
Ravi Anguluri
Innovate On Office Advisory Support Engineer