Someone had offered previously to provide a CCW for ASPOSE.Word. We now have a specific need for this - creating Word docs from an ASP site. Can you create this for us?
Yes, I went on and created a working test some time ago. But my unresolved question was how do you want to pass data into Aspose.Word? Because it is mostly data driven it is important in almost any scenario to pass a DataTable, DataSet or DataView to Aspose.Word. Before I proceed I would like an answer to this question from a customer like you. How do you think you want to pass data into Aspose.Word from ASP? Is it ADO, XML or what?
If it is ADO then probably ADO.Net has some interoperability with it.
If it is XML, is it ADO.Net compatible? I mean will I be able to load it into ADO.Net DataSet object. Maybe you could send me a sample to firstname.lastname@example.org.
As soon as we sort out how to pass data the solution is complete and I will release it.
Thanks for the quick reply. We will be pulling the data from a SQL Server database using “classic” ADO. I think it would be pretty easy from your end to use a .NET Interop wrapper for the ADO COM objects and accept a Recordset with the data? Obviously, this doesn’t address hierarchical data structures, but I don’t know that we have a need for this.
Your second suggestion about XML would be fine as well, but I would prefer the ADO Recordset interface first. The XML version might be more powerful, but also more complicated for coders.
Ok, so be it. I’ll make sure Aspose.Word can use interop wrapper for ADO and add CCW to Aspose.Word. This will be out in our next release scheduled for end of April, we might actually release end of this week.
Aspose.Word 1.4 is out and exposes mail merge methods that will accept and ADO Recordset object. Aspose.Word registers itself for COM interoperation on install so you should be able to try your COM scenario now.
The new COM wrapper is working well from classic ASP using doc.MailMerge.ExecuteADO. However, when trying to get the license working I am getting the following error:
Object doesn’t support this property or method: 'SetLicense’
Is that method not exposed or is there a different method that should be used in classic ASP?
I think I know what’s going on. We forgot to test setting license from ASP code. There is a number of overloads for SetLicense and when exposed to COM it does not know how to deal with overloads.
I will release a hotfix later today.
I’m having problems with the new hot fit (certainly from classic ASP). When I replaced the dll, with the dll in the hot fix, it is now not being recognized on my pc?
Server object, ASP 0177 (0x800401F3)
On another pc the object is recognised but the save method no longer functions?
.NET and COM integration is a bit new to us so we apologize for any problems.
When Aspose.Word.dll was COM registered by the installer it tied it to the exact version of the dll. Now you copied a new version dll over and therefore it rejects to load it.
Try reregistering Aspose.Word.dll using this:
regasm \Aspose.Word.dll /codebase
regasm.exe is a tool included in .NET Framework and must be somewhere in the C:\WINNT\Microsoft.NET folder.
I’m still researching the problem with overloads of SetLicense although I’m no longer sure it is overloading that causes it because Save method is also overloaded and it works.
Firstly, thank you for your quick and efficient responses, I’m sure you don’t get enough credit.
I’ve gotten the latest hot fix and did the things you listed for COM. The issue I have now is the following error
Sorry, there is a problem with Aspose Unlimited license. AssemblyCompany of your assembly does not match the license.
/ICRC_code/letters_display.asp, line 55
Following is our code (line 55 is the open method on the last line)
’—Open the word document
set objWord = Server.CreateObject(“Aspose.Word.Word”)
licenseFile = strLettersPhysPath & "Aspose.Word1.lic"
Set doc = objWord.Open(strLettersPhysPath & strDocName)
We have an unlimited license.
As I’m using classic asp I wasn’t sure if I was to use the AssemblyInfo.vb, so I went ahead and made sure AssemblyCompany was correct in the file, the GUID matched what is in my registry for Aspose.word.Word and I copied the AssemblyInfo.vb to the root directory of my web site.
The error remained the same.
I know we’re extremely close and we all appreciate your help, Thanks.
This error slipped through because in my tests the license was for Aspose and it worked okay.
I’ve fixed and tested this with someone else’s unlimited license. Please download latest Aspose.Word 1.4.7.