Posted on: 9/23/2013 5:41:29 AM | Views : 594

Dear friends
I have a webappication.where i have exporting customer contact details to a word template.
string _filepath = Server.MapPath("~") + "\\WordTemplate\\CustContact.dotx";//this is template in the folde _objDocmerg1.Open(_filepath); Object oMissing = System.Reflection.Missing.Value;
//CODE HERE for retiveing data
string strDoc = "CustAddress" + Convert.ToDateTime(DateTime.Now).ToString("dd-M-yyyy") +"-"+ Convert.ToDateTime(DateTime.Now).ToString("HH-mm"); string strCustAddrorg = Server.MapPath("~") + "\\CustContactRepositry\\" + strDoc + ".doc"; //Here the data rewriting to the word template 
if (System.IO.File.Exists(strCustAddrorg)) { System.IO.File.Delete(strCustAddrorg); } _objDocmerg1.SaveAs(strCustAddrorg);//Saveing _objDocmerg1.Open(strCustAddrorg); ...

Go to the complete details ...