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;
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;