Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to send a fax?

0 views
Skip to first unread message

Zbyszek

unread,
Mar 1, 2002, 3:08:47 PM3/1/02
to
Thank you Edward for the quck answer,

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


Edward Muesch

unread,
Mar 1, 2002, 6:47:10 PM3/1/02
to
What I mean to say is, it is also possible to use the "Print-to-fax" option
and embed the phone number in the print-job for WinFax to use.

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

VictorReinhart

unread,
Mar 1, 2002, 6:30:17 PM3/1/02
to
Yes, this is very possible.

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

Zbyszek

unread,
Mar 1, 2002, 10:01:24 AM3/1/02
to
Hello everyone,

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


Edward Muesch

unread,
Mar 1, 2002, 3:28:22 PM3/1/02
to
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...

Edward Muesch

unread,
Mar 1, 2002, 10:43:50 AM3/1/02
to
I'm not sure if the following will work without the SDK but give it a try.

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

VictorReinhart

unread,
Mar 7, 2002, 11:59:06 AM3/7/02
to
Well,

> 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

Edward Muesch

unread,
Mar 7, 2002, 2:21:19 PM3/7/02
to
I was researching a bunch of stuff at the same time and got a little
distracted. I mixed a few things up and I apologize if I stepped on your
toes.

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

0 new messages