I have written a program as part of our intranet aplication that helps users to print reports from our web site. Basically, the page shows a list of files under a folder and a small printer icon infront of it. If the user wants to print that file, he clicks on the printer icon which brings up a small window with a dropdown list of the printers available to him. He selects a printer and clicks on "print" button. The form submits to another page of code with the "printer name" and "file name" and all the work is done in the second page.
I am getting error in this page. Basically, I am creating an object of Shell and sending the print job to command prompt programmatically. Before the requested file is sent to comand prompt, it is recreated in another folder, "temporary". Error is being pointed to this line of code where the temporary file is created.
set tempfile = fso.createtextfile(tempfolder & "\" & tempfilename & cstr(tempfilenum))
The actual code is in some other folder, let's say "A" and the temporary file is being created in completely different folder, let's say "B" which is out of "A".
Any help or suggestions to fix this please? This has to be fixed very urgently.