Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print to file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00411487
Message ID:
00411865
Vues:
13
>>>>Ah, that may be the problem. I'm not real familiar with the API. Could you give me the syntax for SendMessage()? Keep in mind this is for 2.6.
>>>
>>>Yeppers, try this after WIN.INI has been updated:
m.windsect = 'windows'
>>>m.sendmsg = RegFN('SendMessage', 'III@C', 'I')
>>>= CallFN(m.sendmsg, 65535, 26, 0, @windsect)
>>
>>The same error occurs.
>>If the report form command says
>> report form myrpt to file myfile
>>the error is printer not ready.
>>
>>if it says
>> report form myrpt to print
>>
>>I get a dialog box stating
>> Internal MAPI error.
>>
>>I'm begining to wonder if you just can't do it in 95 with 2.6.
>
>Perhaps not. In my experience under Win98, setting the report output to the Acrobat Writer in the designer, and issuing the REPORT FORM myrpt ENVIRONMENT NOEJECT NOCONSOLE TO PRINTER, brought up a save as dialog from Acrobat that allowed me to indicate the file name. Perhaps clearing the tag and tag2 fields in the first record of the report form table might do the trick. That's a SWAG, however.


George,

Could you please try this program, to see, if you can suppress Acrobat Dialog of choosing names? This program works on NT Server. Last time I tried it from my local computer (with no Acrobat Writter at all) I had Errors about Printer Spooler...
*******************************************************************************
* Description.......: CreatePDF - creates PDF for specified filename
* Calling Samples...: CreatePDF('c:\temp\temp.pdf')
* Parameter List....: pcFileName
* Created by........: Houston Brennan 06/12/2000
* Modified by.......: Nadya Nosonovsky 06/16/2000 10:56:51 AM
******************************************************************************
lparameters pcFileName
if empty(pcFileName)
pcFileName='c:\windows\temp\tempfile.pdf'
endif

local cPDFFile, lcOldSafety, iInitialise, iIsNT, ;
cPdfWriter, cPort, iInstalled, iDoPrompt, iSetFileName

lcOldSafety=set('safety')
cPdfDLLFile = "c:\Program Files\Adobe\Acrobat 4.0\Macros\Office95\PDFMon.DLL"

if not file(cPdfDLLFile )
wait window nowait "Required Acrobat Writter DLL is not present on your local drive" +;
chr(13)+"Will print to default printer..."
return .t.
endif

clear dlls
declare integer PDFMonInitialize in (cPdfDLLFile)
declare integer PDFMonIsOSNT in (cPdfDLLFile)
declare integer IsPDFWriterInstalled in (cPdfDLLFile) ;
string@ cPDFWriterName , ;
string@ cPort
declare integer PDFMonDoPrompt in (cPdfDLLFile) ;
integer iWhichProgram

declare integer PDFMonSetPrompt in (cPdfDLLFile) ;
integer iWhichProgram , ;
integer iNewValue

#define SETPROMPTOFF 0
#define SETPROMPTON 1

declare integer PDFMonSetOutputFilename in (cPdfDLLFile) ;
string cFileName
declare integer PDFMonCleanup in (cPdfDLLFile)

iInitialise = PDFMonInitialize()
*? "Initialise : "
*?? iInitialise

iIsNT = PDFMonIsOSNT()
*? "Is NT : "
*?? iIsNT
set safety off
cPdfWriter = space(100)
cPort = space(100)
iInstalled = IsPDFWriterInstalled( @cPdfWriter, @cPort )
if iInstalled=1 && PDF Writer is installed
set printer to name 'Acrobat PDFWriter'
endif
*? "Installed "
*?? iInstalled
*? "PDF Writer : "
*?? cPdfWriter
*? "Port : "
*?? cPort
*?

iDoPrompt = PDFMonDoPrompt( SETPROMPTOFF )
*? iDoPrompt
*cFileName = "c:\Temp\Test.Pdf"
iSetFileName = PDFMonSetOutputFilename(pcFileName)
*? iSetFileName
*!* pcFileName = ""
*!* iSetFileName = PDFMonSetOutputFilename(pcFileName)
*!* ? iSetFileName

*? PDFMonCleanup()
clear dlls
set safety &lcOldSafety
*? "Finished."
return .t.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform