Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send FAX from Visual Basic using Crystal Reports

Status
Not open for further replies.

mwbrussels

Programmer
Sep 8, 1999
1
BE
hello all,<br>
<br>
is there somebody who already could send a fax in visual basic using crystal report.<br>
<br>
the fax number of receiver would be provided in the visual basic program, report would be build by crystal reports.<br>
<br>
thanks for any info about it ...<br>
<br>
Michel, Belgium
 
Well the only program I've had luck with is WinFAX Pro 8 or 9.<br>
You can Write a DDE link to automate most of the FAXing process.<br>
There are examples that come with WinFAX pro for VB.<br>
<br>
Here is mine:<br>
I used the Commmand Prompt to pass FAX number, FAX name and Company<br>
------------------------------<br>
FindPipe1 = InStr(1, Command, &quot;¦&quot;)<br>
FindPipe2 = InStr(FindPipe1 + 1, Command, &quot;¦&quot;)<br>
'FAXNumber$ = &quot;369-3397&quot;<br>
FAXNumber$ = Left(Command, FindPipe1 - 1)<br>
FAXName$ = Mid(Command, FindPipe1 + 1, FindPipe2 - 1 - FindPipe1)<br>
Company$ = Right(Command, Len(Command) - FindPipe2)<br>
Text1 = FAXNumber$<br>
Text2 = FAXName$<br>
Text3 = Company$<br>
DoEvents<br>
<br>
'SendTime$ = &quot;06:00:00&quot;<br>
'SendDate$ = &quot;12/25/96&quot;<br>
'FAXName$ = &quot;Jimbo Amlaw&quot;<br>
<br>
'Company$ = &quot;Uni-Versal&quot;<br>
<br>
Subject$ = &quot;Joy of Faxing&quot;<br>
Keyword$ = &quot;PO Received&quot;<br>
'BillingCode$ = &quot;5905-001-xx&quot;<br>
Mode$ = &quot;Fax&quot;<br>
CoverPage$ = &quot;P:\AutoFAX\Fax PO Customer Reciept.CVP&quot;<br>
'CoverText$ = &quot;Yo Jimbo I got it to work&quot;<br>
<br>
'Attachment$ = &quot;C:\DATA\OTHER\XMASTREE.FXR&quot;<br>
<br>
'This is the start of the DDE to WinFax.<br>
'Create the link and disable<br>
'automatic reception in WinFax.<br>
<br>
Label1.LinkTopic = &quot;FAXMNG32¦CONTROL&quot;<br>
Label1.LinkMode = 2<br>
Label1.LinkTimeout = -1<br>
Label1.LinkExecute &quot;GoIdle&quot;<br>
Label1.LinkMode = 0<br>
<br>
'Create a new link with the TRANSMIT topic.<br>
<br>
Label1.LinkTopic = &quot;FAXMNG32¦TRANSMIT&quot;<br>
Label1.LinkMode = 2<br>
Label1.LinkTimeout = -1<br>
Label1.LinkItem = &quot;sendfax&quot;<br>
<br>
'Start DDEPokes to control WinFax.<br>
recip$ = &quot;recipient(&quot; & Chr$(34) & FAXNumber$ & Chr$(34) & &quot;,&quot; & Chr$(34) & SendTime$ & Chr$(34) & &quot;,&quot; & Chr$(34) & SendDate$ & Chr$(34) & &quot;,&quot;<br>
recip$ = recip$ & Chr$(34) & FAXName$ & Chr$(34) & &quot;,&quot; & Chr$(34) & Company$ & Chr$(34) & &quot;,&quot; & Chr$(34) & Subject$ & Chr$(34) & &quot;,&quot;<br>
recip$ = recip$ & Chr$(34) & Keyword$ & Chr$(34) & &quot;,&quot; & Chr$(34) & BillingCode$ & Chr$(34) & &quot;,&quot; & Chr$(34) & Mode$ & Chr$(34) & &quot;)&quot;<br>
Label1.Caption = recip$<br>
Label1.LinkPoke<br>
<br>
'setcoverpage<br>
<br>
Label1.Caption = &quot;setcoverpage(&quot; & Chr$(34) & CoverPage$ & Chr$(34) & &quot;)&quot;<br>
Label1.LinkPoke<br>
<br>
'fillcoverpage<br>
Label1.Caption = &quot;fillcoverpage(&quot; & Chr$(34) & CoverText$ & Chr$(34) & &quot;)&quot;<br>
Label1.LinkPoke<br>
<br>
'attach<br>
'Label1.Caption = &quot;attach(&quot; & Chr$(34) & Attachment$ & Chr$(34) & &quot;)&quot;<br>
'Label1.LinkPoke<br>
<br>
'showsendscreen<br>
'Label1.Caption = &quot;showsendscreen(&quot;&quot;1&quot;&quot;)&quot;<br>
'Label1.LinkPoke<br>
<br>
'resolution<br>
Label1.Caption = &quot;resolution(&quot;&quot;HIGH&quot;&quot;)&quot;<br>
Label1.LinkPoke<br>
<br>
'The SendfaxUI parameter is used only<br>
'when a fax-ready cover page and/or<br>
'attachments are included and you do<br>
'not need to print to the WinFax printer<br>
'driver.<br>
<br>
Label1.Caption = &quot;SendfaxUI&quot;<br>
Label1.LinkPoke<br>
<br>
'Send the fax.<br>
Label1.LinkTopic = &quot;FAXMNG32¦CONTROL&quot;<br>
Label1.LinkMode = 2<br>
Label1.LinkTimeout = -1<br>
'Label1.LinkExecute &quot;GoActive&quot;<br>
<br>
'Close the link between the applications.<br>
Label1.LinkMode = 0<br>
<br>
Label1.Caption = &quot;FAX Complete&quot;<br>
<br>
End<br>
------------------------------<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top