inserting page numbers in a word document

I  have a delphi program that creates a multipage document. I would like to
add page numbers to the document.
Can anyone tell me how to do this?
Thanks
Dennis