>Thanks for looking at it Herman. I appreciate it. I am testing it and playing around with it now. I had to play with the sleep times a bit to prevent it trying to connect too soon and still the settings do not seem to be consistent. I wonder if there is a way to postpone processing without using sleep or how to determine the required time to wait. Now everything pretty much works except I continously get a c5 error when it tries to close Adobe.
>
You can use "CreateProcess(...)", then "WaitForInputIdle( hProcess, 5000 )". It will wait for 5 seconds or the process has been ready. For the error, I think it's because of the parameters ( I got error too because of that :) ). Now, I'm not too familiar with Adobe and I don't have the SDK. Maybe you can search there what does it do exactly. I'm afraid that it disconnected the DDE too (well, maybe ?).
>Also, I thought the print method would launch the print dialog but it does not. I'll have to research and see if that is possible. My intention was to silently print but to display the print dialog without displaying Adobe at all as this does (exept that it does not display the print dialog):
>
No, you can't bring up the print dialog without showing the Parent Window of the dialog(Adobe). One way is to monitor Adobe window, then when it display move it to the invisible area (ie.: top = -1000)
>
>lcfile = "c:\tracy\p1.pdf"
>DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
> INTEGER hwnd, ;
> STRING lpVerb, ;
> STRING lpFile, ;
> STRING lpParameters, ;
> STRING lpDirectory, ;
> LONG nShowCmd
>
>llok= ShellExecute(0, "open", "acrord32.exe", " /p /h "+lcfile, "", 0)
>return llok
>
>
>Tracy
Regards
Herman