BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use WinFax in Delphi 3?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development
View previous topic :: View next topic  
Author Message
Jack Roh
Guest





PostPosted: Wed Aug 06, 2003 1:08 pm    Post subject: How to use WinFax in Delphi 3? Reply with quote



Hello, I'm trying to use WinFax Pro 10 to send fax through Delphi 3.
I've wrote the following code but it doesn't work.
Can anybody help me?

procedure TForm1.Button1Click(Sender: TObject);
var
WinFax : OleVariant;
id : integer;
begin

try
WinFax := CreateOleObject('WinFax.SDKSend');
except
ShowMessage('Could not start Win Fax');
end;

WinFax.LeaveRunning;

// if WinFax.AddAttachmentFile('')=1 then ShowMessage('Could not add
file');
if WinFax.SetPrintFromApp(1) = 1 then ShowMessage('Failed Set print');
WinFax.SetTo('ETN Tester');
{ Set the fax number in winfax }
if WinFax.SetNumber(editNumber.Text) = 1 then ShowMessage('Could not
set number');
// if WinFax.SetAreaCode('416') = 1 then ShowMessage('Could set area
code');
if WinFax.AddRecipient = 1 then ShowMessage('Could not add fax
recipient');
if WinFax.SetPreviewFax(0) = 1 then ShowMessage('Could not set
preview');
if WinFax.SetUseCover(0)=1 then ShowMessage('Could not set use cover');
if WinFax.SetResolution(0) = 1 then ShowMessage('Could not set
resolution');
if WinFax.SetSubject('Test Fax') = 1 then ShowMessage('Could not set
subject');
if WinFax.ShowCallProgess(0) = 1 then ShowMessage('Could not show
progress');
if WinFax.EnableBillingCodeKeyWords(1) = 1 then ShowMessage('Could not
enabling code');

id := WinFax.Send(0);
if id <> 0 then ShowMessage('Could not send')
else ShowMessage('Send okay');
{ Wait for the fax program to get ready }
while WinFax.IsReadyToPrint = 0 do ;
{ **** Now print to the fax Driver ******}
sleep(100);
{ need this to allow winfax to run Without this
there will be times when winfax will ask for
the fax number to call
}
{
Wait for an ID from win fax
}
while(WinFax.IsEntryIDReady(0)=0) do;
id := WinFax.GetEntryID(0);
WinFax.Done;
// WinFax.unassign;
end;

Thank you


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.