Hi guys,
I could use some advice. I'm trying to use some methods from a .NET assembly. 
I'm instantiating it like this:

<cfset DLL = "#Expandpath('./')#\Aspose.Words.dll">
<cfobject type=".NET" name="doc" class="Aspose.Words.Document" assembly="#DLL#">

If I dump the doc variable I see all the assembly methods. So far so good.

I recall that I need to call init in CF to invoke the constructor, but when I 
do that (and pass a path to the document) I get the error:

Unable to find a constructor for class Aspose.Words.Document that accepts 
parameters of type ( coldfusion.runtime.LocalScope ).


According to the docs 
http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.documentconstructor2.html
I believe that I need to pass a string. 

In C# the example code looks like this:
Document doc = new Document(MyDir + "Document.doc");

I was trying 
<cfset file = "#Expandpath('./')#\test1.doc">                
<cfset doc.init("#file#")>
but receive the above error.

I admit I am a bit out of my depth here, but previously I have used similar 
libraries successfully after some initial struggles and help from this list. 

Any tips appreciated.

Regards,

Stefan





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345966
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to