Delphi to Windows Fax

Anyone knows how to use Windows 8 Fax to send a fax. Real Delphi.. I mean I need to activate Windows Fax with numbers and pdf attachments.
About that Any tutorials?
Day Thnx.
For example, you can use Fax Service COM Interfaces. Simple operation, you can import the type library of fxscomex.dll library and use such code (based on this example):

uses 
ComObj, ActiveX, FAXCOMEXLib_TLB;

procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
JobIDs: OleVariant;< br /> FaxServer: IFaxServer2;
FaxDocument: IFaxDocument2;
begin
try
FaxServer := CoFaxServer.Create;
FaxServer.Connect('');
FaxDocument := CoFaxDocument.Create;
FaxDocument.Body :='d:\Document.pdf';
FaxDocument.DocumentName :='Document name';
FaxDocument.Recipients.Add ('+1 (425) 555-4567','Bill');
FaxDocument.Sender.Name :='Bob';
FaxDocument.Sender.BillingCode := '23A54';
FaxDocument.Sender.Department :='Accts Payable';
FaxDocument.Sender.FaxNumber :='+972 (4) 555-9070';
JobIDs := FaxDocumen t.ConnectedSubmit(FaxServer);

for I := VarArrayLowBound(JobIDs, 1) to VarArrayHighBound(JobIDs, 1) do
ShowMessage('Job ID: '+ VarArrayGet(JobIDs, [ I]));
except
on E: EOleSysError do
ShowMessage(
Format('Sending of the fax failed! %s [%d]', [E.Message , E.ErrorCode])
);
end;
end;

Or the same without type library:

< pre>procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
JobIDs: OleVariant;
FaxServer: OleVariant;
FaxDocument: OleVariant;< br />begin
try
FaxServer := CreateOleObject(‘FaxComEx.FaxServer’);
FaxServer.Connect(”);
FaxDocument := CreateOleObject(‘FaxComEx.FaxDocument ‘);
FaxDocument.Body :=’d:\Document.pdf’;
FaxDocument.DocumentName :=’Document name’;
FaxDocument.Recipients.Add(‘+1 (425 ) 555-4567′,’Bill’);
FaxDocument.Sender.Name :=’Bob’;
FaxDocument.Sender.Billin gCode := ’23A54′;
FaxDocument.Sender.Department :=’Accts Payable’;
FaxDocument.Sender.FaxNumber :=’+972 (4) 555-9070′;
JobIDs := FaxDocument.ConnectedSubmit(FaxServer);

for I := VarArrayLowBound(JobIDs, 1) to VarArrayHighBound(JobIDs, 1) do
ShowMessage(‘Job ID: ‘+ VarArrayGet(JobIDs , [I]));
except
on E: EOleSysError do
ShowMessage(
Format(‘Sending of the fax failed! %s [%d]’, [E .Message, E.ErrorCode])
);
end;
end;

Anyone knows how to use Windows 8 fax Sending faxes is real Delphi.. I mean I need to start Windows fax with numbers and pdf attachments.
Any tutorials on that?
Day Thnx.

For example, you can use Fax Service COM Interfaces. For simple operations, you can import the fxscomex.dll library Type library and use code like this (based on this example):

uses
ComObj, ActiveX, FAXCOMEXLib_TLB;

procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
JobIDs: OleVariant;
FaxServer: IFaxServer2;
FaxDocument : IFaxDocument2;
begin
try
FaxServer := CoFaxServer.Create;
FaxServer.Connect('');
FaxDocument := CoFaxDocument.Create;
FaxDocument.Body :='d:\Document.pdf';
FaxDocument.DocumentName :='Document name';
FaxDocument.Recipients.Add('+1 (425) 555-4567', 'Bill');
FaxDocument.Sender.Name :='Bob';
FaxDocument.Sender.BillingCode := '23A54';
FaxDocument.Sender.Department :='Accts Payable' ;
FaxDocument.Sender.FaxNumber :='+972 (4) 555-9070';
JobIDs := FaxDocument.ConnectedSubmit(FaxServer);

for I := V arArrayLowBound(JobIDs, 1) to VarArrayHighBound(JobIDs, 1) do
ShowMessage('Job ID: '+ VarArrayGet(JobIDs, [I]));
except
on E: EOleSysError do
ShowMessage(
Format('Sending of the fax failed! %s [%d]', [E.Message, E.ErrorCode])
);
end;< br />end;

Or the same without type library:

procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
JobIDs: OleVariant;
FaxServer: OleVariant;
FaxDocument: OleVariant;
begin
try
FaxServer := CreateOleObject(' FaxComEx.FaxServer');
FaxServer.Connect('');
FaxDocument := CreateOleObject('FaxComEx.FaxDocument');
FaxDocument.Body :='d:\Document.pdf ';
FaxDocument.DocumentName :='Document name';
FaxDocument.Recipients.Add('+1 (425) 555-4567','Bill');
FaxDocument.Sender. Name :='Bob';
FaxDocument.Sender.BillingCode := '23A54';
FaxDocument.Sender.Department: ='Accts Payable';
FaxDocument.Sender.FaxNumber :='+972 (4) 555-9070';
JobIDs := FaxDocument.ConnectedSubmit(FaxServer);

for I := VarArrayLowBound(JobIDs, 1) to VarArrayHighBound(JobIDs, 1) do
ShowMessage('Job ID: '+ VarArrayGet(JobIDs, [I]));
except
on E: EOleSysError do
ShowMessage(
Format('Sending of the fax failed! %s [%d]', [E.Message, E.ErrorCode])
);
end;
end;

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3162 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.