Nadya,
Yes, if you know any other application that could print pdf files without acrobat. Any ideas?
>Yuri,
>
>Do you think it would be possible without opening Adobe?
>
>>Carlos,
>>
>>See my notes below
>>
>>>DECLARE INTEGER ShellExecute ;
>>>IN SHELL32.DLL ;
>>>INTEGER nWinHandle,;
>>>STRING cOperation,;
>>>STRING cFileName,;
>>>STRING cParameters,;
>>>STRING cDirectory,;
>>>INTEGER nShowWindow
>>>? ShellExecute(0,"print", FullPath('MyFile.pdf'),"",0)
>>
>>One parameter is missing. Should be:
>>? ShellExecute(0,"print", FullPath('MyFile.pdf'),"","",0)
>>
>>>
>>>---------------------------------------------------------
>>>I just read this thread
>>>
>>>I have some questions
>>>
>>>1.I changed the parameter order because it did’t work
>>>
>>>? ShellExecute(0,"print", “MyFile.pdf”,'',”Path”,0)
>>>
>>>2. It opens the Adobe Reader and don’t close it
>>>What I can I do?
>>
>>Something like this:
>>
>>IF ShellExecute(0,"print", FullPath('MyFile.pdf'),"","",1)>32
>>
>> oShell = CreateObject("WScript.Shell")
>> *wait for Acrobat reader
>> lntimeout=60
>> lnstarttime=SECONDS()
>> DO WHILE not oShell.AppActivate("Acrobat Reader") AND ;
>> SECONDS()-lnstarttime<lntimeout
>> INKEY(2)
>> ENDDO
>>
>> IF oShell.AppActivate("Acrobat Reader")
>> *While printing Acrobat reader cannot be closed; so repeat
>> * attempts to close it.
>> lnstarttime=SECONDS()
>> DO WHILE oShell.AppActivate("Acrobat Reader") AND ;
>> SECONDS()-lnstarttime<lntimeout
>> oShell.SendKeys("^q")
>> INKEY(2)
>> enddo
>> endif
>>
>> oShell=.null.
>>ELSE
>> ?"file not found "
>>ENDIF
>>
>>
>>
>>>
>>>3 How can I change printer
>>
>>One of the ways is:
>>oWSHNet = CREATEOBJECT('Wscript.Network')
>>oWSHNet.SetDefaultPrinter('Windows_Printer_Name')
>>oWSHNet =null
>>
>>>
>>>TIA
>>
>>Good Luck