CreateDocument "data is invalid" problem

  • Thread starter Thread starter David Cresswell
  • Start date Start date
D

David Cresswell

I have followed various threads in this newsgroup and managed to get a
simple Delphi program written which uses the basic
CreateOleObject/CreateDocument/Send combination to print, for example, a PDF
file. I understand that the file extension needs to be associated with a
program (in this case Acrobat) with a suitable "Print" facility.

I have a different kind of file extension for which I have my own
viewer/printer (again in Delphi) which works perfectly well when the
associated file extensions are attached via Windows Explorer. If, however, I
return to my CreateOleObject example, I hit a problem at the point where I
do the "Send". The error message says "data is invalid" which I have seen
mentioned a number of times in this newsgroup (and others).

My question is, are there any special requirements of the application used
to perform the print action that I am overlooking in order for the FaxServer
to be able to do its job?

Thanks in advance

Dave C
 
Managed to answer my own question...in the absense of any replies ;o(

It wasn't the "Print" association I needed but the "Printto" one.

Not sure whether it is a standard protocol but most apps seem to use the
"/pt %1 %2 %2 %3" syntax - problem solved!
 
Back
Top