We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Mail Merge Word Document and Send DOCX to Web Browser for Download or to Open in Browser using C# ASP.NET

Hi,

I am attempting to output a word document to the browser. According to the documentation, I should be able to set a save type.

VB.NET Code

Dim doc As Document = New Document(MyDir & “MailMerge.ExecuteArray.doc”)

’ Fill the fields in the document with user data.

doc.MailMerge.Execute(New String() {“FullName”, “Company”, “Address”, “Address2”, “City”}, New Object() {“James Bond”, “MI5 Headquarters”, “Milbank”, “”, “London”})


’ Send the document in Word format to the client browser.

doc.Save(“PersonalizedLetter Out.doc”, SaveFormat.Doc, SaveType.OpenInBrowser, Response)

When I attempt to do this, I get an error "No Accesible save accepts this number of arguments)

Thanks
David

Hi there,

Thanks for the inquiry. This is the correct sytnax for this method, which version of Aspose.Words and the .NET framework are you are using? Most likely the issue you are experiencing is explained in this thread here.

Thanks,

Thanks Adam,

I switched from 3.5 to the 2.0 DLL's and the additional save method became available.


Regards

David