Hello lakshmanchanda,
The best place to find out how to reinstall Windows on your Compaq is the Compaq support page for your exact model.
Start here: http://www.compaq.com/country/cpq_support.html
Your Internet Service Proviver (ISP) most likely has a FAQ on how to configure Outlook 2007 to connect to your email.
Buy Office 2007 Now, Get Office 2010 Free http://office2010.microsoft.com/en-us/tech-guarantee/microsoft-office-2010-technology-guarantee-FX101825695.aspx?CTT=97