NewFromMattel
Programmer
I am treading new waters here, and would like to get some helpful info on using ActiveX in CF.
I have an ActiveX tag installed on our (installed correctly I'm sure). And have an example on how to call it in Visual Basic. But need to call it in CF. Can someone tell me how to do it? Here is my example:
Private Sub Command1_Click()
Dim pdf As Object
Set pdf = CreateObject("TextPDF.TextPDFClass"
pdf.License = "xxxx-xxxxx-xxxx-xxxx"
pdf.StartPDF outputfile:="c:\output.pdf"
pdf.PrintPDF "c:\test1.txt"
pdf.PrintPDF "c:\test2.txt"
pdf.PrintPDF "c:\test3.txt"
pdf.EndPDF
Set pdf = Nothing
End Sub
Now, here's how I've tried to implement it in CF:
<cfobject type="COM" name="pdf" class="TextPDF.TextPDFClass" action="CREATE">
<cfset pdf.License = "xxxx-xxxxx-xxxx-xxxx">
<cfset pdf.StartPDF = "outputfile:='c:\output.pdf'">
<cfset pdf.PrintPDF = "c:\test1.txt">
<cfset pdf.PrintPDF = "c:\test2.txt">
<cfset pdf.PrintPDF = "c:\test3.txt">
<cfset pdf.EndPDF>
<cfset pdf = "Nothing">
Didn't work. I got the following error.
Arguments expected by object does not match arguments specified in the tag.
Error building an argument list for: STARTPDF
But I rather clueless here. I'd appreciate any help.
I have an ActiveX tag installed on our (installed correctly I'm sure). And have an example on how to call it in Visual Basic. But need to call it in CF. Can someone tell me how to do it? Here is my example:
Private Sub Command1_Click()
Dim pdf As Object
Set pdf = CreateObject("TextPDF.TextPDFClass"
pdf.License = "xxxx-xxxxx-xxxx-xxxx"
pdf.StartPDF outputfile:="c:\output.pdf"
pdf.PrintPDF "c:\test1.txt"
pdf.PrintPDF "c:\test2.txt"
pdf.PrintPDF "c:\test3.txt"
pdf.EndPDF
Set pdf = Nothing
End Sub
Now, here's how I've tried to implement it in CF:
<cfobject type="COM" name="pdf" class="TextPDF.TextPDFClass" action="CREATE">
<cfset pdf.License = "xxxx-xxxxx-xxxx-xxxx">
<cfset pdf.StartPDF = "outputfile:='c:\output.pdf'">
<cfset pdf.PrintPDF = "c:\test1.txt">
<cfset pdf.PrintPDF = "c:\test2.txt">
<cfset pdf.PrintPDF = "c:\test3.txt">
<cfset pdf.EndPDF>
<cfset pdf = "Nothing">
Didn't work. I got the following error.
Arguments expected by object does not match arguments specified in the tag.
Error building an argument list for: STARTPDF
But I rather clueless here. I'd appreciate any help.