Hi. I have problem printing PDF or even opening Acrobat reader files from VFP. On Abode site I found in the SDK documentation, some acrobat call parameters;
These commands worked fine when I run it in Windows (Vista enterprise). But if I do a run in fox, nothing append. So I decide to use ShellExecute. Here some code;
The program return 31 and MSDN said;
I’ve tried it with XP and end up with the same message.
Thanks in advance.
Nro
AcroRd32.exe /p pathname — Start Adobe Reader and display the Print dialog box.
AcroRd32.exe /t path "printername" "drivername" "portname" — Start Adobe Reader and print a file while suppressing the Print dialog box. The path must be fully specified.
These commands worked fine when I run it in Windows (Vista enterprise). But if I do a run in fox, nothing append. So I decide to use ShellExecute. Here some code;
Code:
DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin
tcPdfFile = "P:\Objitech\Apps\Mis\Web\PDF\A_FR_COFA_8123_M5L01RFC.PDF"
IF FILE(tcPdfFile) THEN
? ShellExecute(0, "AcroRd32.exe", tcPdfFile, "", "", 0)
ENDIF
CLEAR DLLS ShellExecute
The program return 31 and MSDN said;
Any suggestions?The ShellExecute() function returns the value 31 if there is no association for the specified file type or if there is no association for the specified action within the file type
I’ve tried it with XP and end up with the same message.
Thanks in advance.
Nro