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

Free Support Forum - aspose.com

Aspose Error! not a valid filename. INCLUDETEXT

JDK 1.6 update 30

MS Windows Server 2003

Service Pack 2

Latest Aspose.Words.jdk16.jar (10.7.0)

I have been testing Aspose.Words for Java properly on my local machine and we picked up one or two problems but through your help have sorted everything out and we are in the process of purchasing a license when we decided to run the software on our production machine (specs as listed above) and have realized that the INCLUDETEXT text does not want to work as it did on our development machines. The main difference being that our development machines are 64bit and running on Windows 7 and the server is a 32bit machine and running on Windows Server 2003. I run exactly the same piece of code on both machines, on my development machine the merge works perfectly, but on the server I get the "Error! not a valid filename" error where the includetext is.

The files that it refers to is definitely in place and the code is very very basic. I have in the meantime also tested the code on a 32bit development machine (Windows 7) and the merge worked perfectly, so now the only difference is that one machine is on the Windows 7 operating system and the server (where it isn't working) is running on MS Server 2003?? Could this be the problem??

Please help, our entire letter printing system is standing still because of this.

Thank you

Izaak

(I am attaching my templates)

I think I have realized the problem. Not sure that this is the way Aspose.Words should be working though, but at least now I have a work-around solution:

I realized that if my code is run on the C: drive (also where the template and supporting templates are) and that the source file is on the D: drive, this error occurred.

So all I did to resolve this was to move everything to C: and now it's working?

Hello

Thanks for your request. It is expected behavior. If you try doing the same in MS Word you will get exactly the same result.

Please just open your document using MS Word and press Alt-F9 to hide/show the field code.

{ INCLUDETEXT "C:\\PostmanPat\\South Africa - General Signature.docx" \* MERGEFORMAT }


To avoid this problem the path to file should be correct.

Best regards,

Hi Andrey,

I think you might be misunderstanding me. The path to the file is 100% correct. I did not have the source file on the same drive where I had the template and the supporting templates.

For example: I had my source file (CSV file) on drive D: and my templates and all the supporing templates (referenced by the INCLUDETEXT) were on drive C:. My code was also on drive D and this resulted in the merge working, but without the INCLUDETEXT working (EVEN THOUGH THE FILE PATHS WERE IN FACT CORRECT). Test it on your side and you will see what I mean! Surely this is a bug?

Best regards

Izaak

Hello

Thank you for reporting this problem to us and for the additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

The issues you have found earlier (filed as WORDSJAVA-418) have been fixed in this .NET update and this Java update.