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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faxing from Access 1

Status
Not open for further replies.

Steve101

Programmer
Mar 29, 2002
1,473
0
0
AU
I am able to fax from my Access application, providing I have the fax modem / driver located on the local workstation. I reference the Faxcom 1.0 Type Library, and the code I use is shown below. It works great providing that I am running it from a workstation with the fax server located on it, and the ServerName parameter is set to this workstation. When I attempt to fax "over the network", I get a "method connect of object ifaxserver failed 80004005 ...." type error.

Does anyone have any simple suggestions on how I can fax over the network from within Access. What other drivers / options are available to do this. Perhaps there is a way to modify my existing code to achieve this?

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
[tt]
Public Function SendFaxviaFaxServer(ServerName, _
FaxSenderCompany, _
FaxSenderName, FaxSenderFax, _
FaxCoverPageName, _
FaxCoverPageSubject, _
FaxCoverPageNote, _
FaxNumber, FaxRecipient, FaxDocument)
'-------------------------------------------------------------------------------
'This function generates a fax from a file, to a specific fax number.
'It relies on a Fax Server being installed, plus the associated fax
'modem being operational.
'-------------------------------------------------------------------------------
Dim FS As FaxServer: Set FS = CreateObject("FaxServer.FaxServer")
Dim FD As FaxDoc

Set FD = FS.CreateDocument(FaxDocument)
FD.SendCoverpage = True
FD.CoverpageName = FaxCoverPageName
FD.CoverpageNote = FaxCoverPageNote
FD.CoverpageSubject = FaxCoverPageSubject
FD.FaxNumber = FaxNumber
FD.RecipientName = FaxRecipient
FD.SenderCompany = FaxSenderCompany
FD.SenderName = FaxSenderName
FD.SenderFax = FaxSenderFax
FS.Connect ServerName
FD.Send
FS.Disconnect

Set FD = Nothing
Set FS = Nothing

End Function
[/tt]

Any help would be appreciated,

Thanks in advance,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
sorry i cant help you with faxing over the network? However,
perhaps you can help with my fax problem? i would like to know if there is any way to attach a document like a word doc or an access report snapshot with this code
 
Personally I use GFI Faxmaker for Exchange ( It allows faxes to be sent via exchange server. Anything the server can print, can be faxed. Although I found that it will not fax landscape reports properly. It squashes the image and sends it portrait.

All I have to do in code is use docmd.sendobject to send a properly formatted fax address and any report I want. I find snapshots work best for faxing (install the snapshot viewer on the server for Faxmaker)...

DoCmd.SendObject acSendReport, "ReportName", "Snapshot Format (*.SNP)", StrEmailAddresses, , , strSubject, strMessage, False

You might also explore other email fax solutions.

For everything Outlook and Exchange checkout
 
To lameid:
You mentions output to snapshot re faxing perhaps you can help me with the problem I have re snapshot format see thread703-438479
 
pwise,

The FaxDocument parameter is the filename of the document which you want to incorporate into the fax; for example, its value could be "C:\Test.doc". This files contents would then form pages 2 through n of the fax.

LameId,

thanks for the reference to GFISoftware + the sample code. It seems pretty good and reasonably priced, so with your reference, I'll give it a go,

Regards,
Steve Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Steve,

I wondered if you could give me a little advice. I am trying to do something similar, using similar code, but a run-time error occurs at the 'Send' command.

Public Function SendFaxviaFaxServer(FaxNumber, FaxDocument)

Set FaxServer = CreateObject("FaxServer.FaxServer")

'local server
FaxServer.Connect ""
Set FaxDoc = FaxServer.CreateDocument(FaxDocument)
FaxDoc.FaxNumber = FaxNumber
FaxDoc.Send

Set FaxDoc = Nothing
Set FaxServer = Nothing

End Function

The error message is

-2147024894 (80070002)
Method 'Send' of IFaxDoc failed


Any Suggestions??
 
Some of the other properties associated with the Send method might be required. See my code for these; eg. you might have to set the sendcoverpage property to false. If you need an example, I'll have to go find one; let me know if this helps,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Hi Steve101

Did you ever get the code to run in FaxCom?

My current project is to automate sending faxes, with attachments, to persons in our Access Database. I am currently creating an email, attaching the body etc and having it save the email for subsequent manual input in the 'Fax Address Builder'. Too much User input!

Your code was similar to code (which I can't get to work) I had picked up while serfing. So I changed a few things to make it more like your code, but it doesn't recognize many of your Methods. Is there some constant I need to declare or a library that is required?

Thanks in advance.

 
I figured out the fax thing.
the docmd.sendobject is for both email & fax.
It requires outlook, or outlook express.
It also requires a MAPI program like MS Exchange or Microsoft fax.
this is the object:
DoCmd.SendObject acSendNoObject, , acFormatTXT, recipient1, recipient2, recipient3, subject, message, False

email example:
Function sendEmail()
Dim recipient1, recipient2, recipient3, subject, message As String
recipient2 = "qq@qqq.com"
recipient3 = "ww@ww.com"
message = getMessage()
recipient1 = strDealerEmail
DoCmd.SendObject acSendReport, "rptContract2", acFormatRTF, recipient1, recipient2, recipient3, "Contract Verification", message, False
MsgBox "Your email has been sent.", vbOKOnly, "My Company"
End Function

fax example:
Function sendFax()

strdealerFax = "(" & Left(strdealerFax, 3) & ") " & Mid(strdealerFax, 4, 3) & "-" & Right(strdealerFax, 4)

If Not Left(strdealerFax, 4) = "(631" Then
strdealerFax = "1 " & strdealerFax
End If

DoCmd.SendObject acSendReport, "rptContract3", acFormatRTF, "[fax: " & [strdealerFax] & "]", , , , , False
MsgBox "Your fax has been sent.", vbOKOnly, "My Company"
End Function
-Jerry
 
cchristi - I am trying to use BisCom / FAXCOM from Access.
Just wondering if you had found a solution for this service?


Some of us have the Groupwise integration, and some of us have the BisCom FAXCOM agent.

As you stated - lots of manual input. want to get rid of that.

 
Hi kaatjev

Yes, I got it to work, but there is still too much user entry. I believe the problem is I don't know the Novel extensions. (i.e. *.bodyText *.Subject *.Recipients.ADD etc.) By trial and error I figured some/enough out, but still haven't figured out a way to pass the minimum recipient's data thru Groupwise into Faxcom. I haven’t worked much on it since then. Where are you stuck?

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since faxing thru Groupwise versus Outlook and all the other fax applications is quite different, I started a new thread. See the new thread 181-1092469 Please reply/refer/review that thread only if your Question or Solution is specific to sending faxes from MS Access through Groupwise and/or Faxcom.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top