But.... Is it possible to send automaticaly by fax (WinFax or somethng else)
the DataWindow-report or I have to creage an txt-file?
Zbyszek
I had given some thought to the PSR method but this only works if your
recipients have the PSR viewer. If this can be setup then by all means use
Victor's suggestion.
-EGM
Edward Muesch <emu...@hotmail.com> wrote in message
news:ajdsAEW...@forums.sybase.com...
> According to a couple of postings in Powerbuilder newsgroups it is
ossible.
> However, I have not been able to find the exact method. I suggest you
check
> the WinFax documentation and try their web site for info on exactly how to
> do it.
>
> Also, do a search on www.google.com and you'll find a lot of discussions
on
> Powerbuilder and WinFax.
>
> HTH
>
> -EGM
>
> Zbyszek <Cr...@skrzynka.pl> wrote in message
> news:5Sb4x5V...@forums.sybase.com...
I did it as follows:
1) Install a compiled PSR File Viewer (eg, PSRVIEW.EXE)
2) Associate PSRVIEW.EXE with the .PSR file extension. This is done by
adding entries in the Registry. See how MS Word works: look in HKEY_ (ther
first KEY) under .doc and figure it out.
Test it as follows: Open Windows Explorer and double-click on a .PSR file.
It should open. Right-click on the PSR file, and choose Print. It should
print.
3) Save your datawindow as a PSR File:
dw_1.SaveAs("c:\faxtemp\temp.psr",PSReport!,FALSE)
4) Add the PSR File as an attachment to your email:
li_rc=sendOBJ.AddAttachmentFile("c:\faxtemp\temp.psr")
IF li_rc<>0 THEN
MessageBox('Error','Add Attachment Failed')
END IF
5) Optionally, let the user preview the report. This is ultra-cool!
li_rc=sendOBJ.SetPreviewFax(1) // Ultra cool and way bitchin'
6) Send the fax:
li_rc=sendObj.Send (0)
// was there an error?
If li_rc <> 0 Then
MessageBox('Send Error',"There was an Error")
Else
//MessageBox('Send OK',"Fax has been sent!", Information!)
End If
Hope that helps.
VictorReinhart
I have some reports in my application. I made it using PB7. Now I have to
send them by fax.
I know that I can do this choosing WinFax as a default printer. But how can
I automaticaly enter phone number (selected from the database)?
Thank's in advance
Zbyszek
Also, do a search on www.google.com and you'll find a lot of discussions on
Powerbuilder and WinFax.
HTH
-EGM
Zbyszek <Cr...@skrzynka.pl> wrote in message
news:5Sb4x5V...@forums.sybase.com...
HTH
-EGM
The WinFaxPro SDK
http://www.symantec.com/winfax/sdk.html
=-=-=-=-=-=-=-= Originally posted by Francois Vachon on Aug. 10, 1999
You can use the following code, that work fine for me.
OLEObject objWinfaxSend
Integer result
objWinfaxSend = CREATE OLEObject
result = objWinfaxSend.ConnectToNewObject("WinFax.SDKSend")
objWinfaxSend.SetUseCover(1)
objWinfaxSend.SetSubject('TEST FV')
objWinfaxSend.SetCoverText('Test Francois Vachon')
IF objWinfaxSend.AddAttachmentFile("c:\test.txt") = 1 THEN
Messagebox(title, "Could Not Add File")
return
end if
objWinfaxSend.SetNumber('12345678910')
// Don't forgot this line...
objWinfaxSend.AddRecipient()
IF objWinfaxSend.Send(0) = 1 THEN
MessageBox('Error','The fax can not be send')
END IF
=-=-=-=-=-=-=-=
Zbyszek <Cr...@skrzynka.pl> wrote in message
news:7a4OzNT...@forums.sybase.com...
> I had given some thought to the PSR method but this only
> works if your recipients have the PSR viewer. If this can
> be setup then by all means use Victor's suggestion.
We are talking about sending a fax! Of course, the recipient of the fax
does not need the PSR File Viewer (they don't even need a PC, just a fax
machine, after all).
The *sender* needs the PSR viewer. This person *does* have a PC, and of
course, has your PB application as well.
This method works wonderfully. We have many people who use this method.
The key thing is that you must have your PC set up so if you right-click,
then click Print, it prints. It can be a .doc file, a .xls, or .psr -- any
file with an associated viewer/printer. It's not really that hard to do.
There are several free PSR file viewers out there, and I have written one
too.
By the way, why doesn't Sybase give away and promote a PSR File Viewer,
like Adobe gives away Acrobat? Seems like a good idea to me. That way, we
could just tell someone: connect to www.sybase.com and download the PSR
file viewer!
VictorReinhart
I think I got thrown by the e-mail attachment thing and wasn't looking
closely enough at all the code.
-EGM
<VictorReinhart> wrote in message
news:6028EBA32DEDF743005D4D3285256B75.00039E3A85256B70@webforums...