Fax using automation fails in strange way

B

Bill Todd

I am attempting to fax a file via automation. My code works perfectly
with a .DOC file. When I use the same code with a .PDF file the call
to the Send method never returns.

What has me puzzled is that if I drag the same PDF file and drop it on
the Fax printer icon it works perfectly.

Any suggestions on what to check would really be appreciated. The code
follows. It is in Delphi but don't hold that against me.<g>

Bill

procedure TForm1.FaxFile(DocFile, FaxNumber, Recipient: String);
var
FaxServer: Variant;
FaxDoc: Variant;
JobId: Integer;
begin
FaxServer := CreateOleObject('FaxServer.FaxServer');
FaxServer.Connect('DellInsp8000');
FaxDoc := FaxServer.CreateDocument(DocFile);
FaxDoc.FaxNumber := FaxNumber;
FaxDoc.RecipientName := Recipient;
JobId := FaxDoc.Send;
FaxDoc := Null;
FaxServer.Disconnect;
FaxServer := Null;
end;
 
R

Richard Ehemann

I know Microsoft Fax uses associations to convert the document to a TIFF and
then send it out. I would guess that Fax is trying to automate whatever is
associated with PDF's, but can't do it. I do recall reading somewhere in this
group that the associated application must have a "print verb" that MS Fax can
call behind the scenes. Maybe you need to upgrade/install Acrobat.

Hope this helps,
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top