Hi ,
I have developed a mail merge solution using Aspose.words.net 8.2.1 version ,its working in my local machine using windows xp with IE7 ,but when i deploy it in windows 2008 R2 with IE8 its not working,and it is not working in any of the server machine.Its working fine if i save the document.But its not working when i open the document in browser.The document is not opening in the browser in IE8,IE6 in windows 2008 R@ and windows 2003.
Here is my code for reference
string buname = GetBUNameForID(buid);
MSCRMService.BusinessEntity quonobe = Quote(QuoteID);
string quotenumber = Getquotenumber(quonobe);
Guid companyid = GetAccountID(quonobe);
string[] companyDetails = GetAccountNameForID(companyid);
string companyname = companyDetails[0];
string companymailid = companyDetails[1];
string companystate = companyDetails[2];
string tandc = GetTermsandConditions(companystate);
string quotedate = GetquoteDate(quonobe);
// Open an existing document.
string PATH = Server.MapPath(".");
Document doc = new Document(PATH + "\\SAMPLEQUOTE2.dotx");
// Document doc = new Document("E:\\Divya\\SAMPLEQUOTE2.dotx");
// Use DataTable as a data source.
MSCRMService.BusinessEntityCollection productbc = QuoteDetails();
DataTable Products = productregion(productbc);
//// The table name property should be set to match the name of the region defined in the document.
// Products.TableName = "Products";
// doc.MailMerge.ExecuteWithRegions(Products);
// Instead of using DataTable you can create a DataView for custom sort or filter and then mail merge.
DataView productDetailsView = new DataView(productregion(productbc));
productDetailsView.Sort = "ProductName ASC";
doc.MailMerge.ExecuteWithRegions(productDetailsView);
// Fill the fields in the document with user data.
doc.MailMerge.Execute(
new string[] { "Company", "UserFax", "UserFrom", "UserDept", "UserTelephone", "UserFax2", "UserEmail", "Business_Unit", "UserStreet1", "UserStreet2", "UserState", "UserPostCode", "Title", "QuoteID", "TermsandConditions", "QuoteDate" },
new object[] { companyname, companymailid, fullname, buname, phone, faxno, Email, buname, street1, street2, state, postalcode, title, quotenumber, tandc, quotedate });
// Send the document in Word format to the client browser.
// doc.Save(// "PersonalizedLetter Out.doc", SaveFormat.Doc, SaveType.OpenInBrowser, Response);
doc.Save("Report Out.doc", SaveFormat.Doc, SaveType.OpenInApplication, Response);
// doc.Save("C:\\BPBitumen\\Document.OpenFromFile Out.doc");
The word is not opening the document in browser in IE8.what i need to do.