I've seen so many VBA's on how to print the footer on the last page that I'm totally lost now.

I've got a document that sometimes has one page and sometimes has multiple pages. I'd like to have the footer (either entered through the print preview - page setup customer footer | by picture | or even by particular cells) to print only on the last page. Can anyone share with me the correct VBA code to insert under 'view code'?