Well, I'm creating a new document using Aspose.Words. My source code is based on Delphi 7 (I'm using the ManagedVCL to make the code conection with .Net FrameWork)
Here is my code:
type v = Variant;
function x(const Params: array of v): v; begin Result := VarArrayOf(Params); end;
procedure MakeAsposeDocument; var AsposeWordAssembly, strLicense: String; begin // Aspose Library if FileExists('C:\Program Files\Aspose\Aspose.Words\Bin\Aspose.Words.dll') then AsposeWordAssembly := 'C:\Program Files\Aspose\Aspose.Words\Bin\Aspose.Words.dll' else raise Exception.Create('Error Aspose Library');
I don't have Delphi7 to test but I beleive you are using wrong CreateInstanceFrom overload to pass parameters. Here is the list of overloads as they appear in MSDN:
Overload List:
Creates an instance of the type whose name is specified, using the named assembly file and default constructor.
[C#] public static ObjectHandle CreateInstanceFrom(string, string);
Creates an instance of the type whose name is specified, using the named assembly file and default constructor.
[C#] public static ObjectHandle CreateInstanceFrom(string, string, object[]);
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters.
When I was with the Aspose.Word version, my source code generated the document perfectly. Now, with the Aspose.Words 3.5 version, my source code (the code that I've sent you) has no more the same function.
Could you send me your MSN contact please? We can talk more about it...
Assuming you are creating the document from scratch, this issue looks very strange because "Unknown file format" is normally thrown when an attempt of opening an unrecognized document format is made. Could you please explain what that temporary 'C:\MyDoc.doc' is for in your code?