thanks a lot Paul. it worked perfect.
I also have another question which is related to your reply to one of the old posts I found. (how to delete the last page in word vba).

I think I have to close this post and start a new one with a different title. I would appreciate if you reply to my new post.

regards
Maz