Excel save as pdf hangs when launched through a watch folder

Hi there,

I've configured a watch folder to launch a batch file which launch a .exe file I've written in C++

In this application I launch Excel which open a .XLS document which contains macros.

At the end of the computations there is a macro which save as pdf.

At this point everything hangs and I have to cancel the job I've created for the watch folder.

If I disable the watch folder and I place the starting file inside the watch folder

and I manually launch the .bat file (which usually is launched by the watch folder) everything works perfectly.

I really really hope there will be someone here coming with a solution for me.

I look forward to hearing from you.

Have a nice day,


Davide


  • Edited by davide333 Friday, March 06, 2015 1:59 PM
March 6th, 2015 1:43pm

Hi there,

unfortunately that's not the problem.

The answer you gave me is really disappointing and also a bit insulting.

I'm aware accusing someone else is the quickest way to fix an issue

but in this case the culprit is and remain Microsoft

who is responsible for both the watch folders and Excel.

I can reproduce the problem even removing my application from the equation so now we have cleared

the issue is not casued by my application.

So if you want to try it yourself just follow the steps below:

1) create an excel document so that after you open it it automatically run a save as pdf operation and close excel. (let's call this document "PRINT_TEST.xls")

2) create a batch file named "Excel_launcher.bat" and write the command

""C:\Program Files\Microsoft Office 15\root\office15\EXCEL.EXE" "C:\teststampapdf\PRINT_TEST.xls""

3) Now create a watch folder job that execute that batch file.

something like "C:\watchfolderX\Excel_launcher.bat"

4) now create a watch folder that uses that job and for file filter use "*.txt" enable it and start it

5) now launch manually the batch file and you'll see that it print the pdf and closes itself

6) drop a txt file inside the watch folder you've created and you'll see it hangs at the save as pdf operation.

This is something that have to be fixed and it's due to excel.

I can launch and save documents with all the application I want but excel so that's the problem.

Please take a look and keep me updated I badly need to find a solution for this issue.

THANK YOU in advance,


Davide

Free Windows Admin Tool Kit Click here and download it now
March 12th, 2015 2:23pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics