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!

faxing word document from within visual basic application

Status
Not open for further replies.

WFadloun

Programmer
Aug 18, 2003
42
AE
hello all

my idea goes like this :
1- write fax using msword application.
2- saving this file.
3- from my vb application ,,,, I want to give the user ability to select this file then choose reciepts from registered customers ,,, then the application will send this fax to those selected reciepts one bye one and record sending result weather it has been succeed or fail.

could you recomend me the best faxing tools,mehtod,source which will give me ability for this development .

thanx in advance
 
Hi, this might shed some light on your prob, but I don't think it will solve it :)

Most modems come with Faxing software, that can be used to send faxes and keep record of what has gone through and what has not, something like "FaxTalk Communicator"

However, if you still want to strutt your stuff from VB, I can tell you that most faxing software installs a "Fax Printer", this means you could open you select your word files and then send them print them to the fax printer.

Dunno if this is gonna help you, just my 2cnts worth!

*****************************************
May the Code Be With You...[lightsaber]
----------
x50-8 (X Fifty Eigt)
 
I have used Winfax with some success:


however it's a couple of years since I used it, and the code was done on a client's machine, so I sadly don't have any details any longer.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
I had a simualar request, but didn't get an answer yet.

I wanted to fax from VB or VBA within MS-Word, but skip
the faxes popup that asks who/what number to send to.
The code has the phone number and wants to pass it to the fax printer directly.

We could try WinFaxPro or HP's FaxPrinter software.
Currently they both require user selection of number.

Do you have any insights?
 
Here is a way if you have a database of numbers...

You can use MSFAX is you wish. You just need to set up in outlook (thats my email client) add a new email called Fax Mail Transport. It is in the list you chose from. Then in the modules section place this code...
'********************************************************************************************
' This function will walk through the Customers table and fax the Invoices report which
' is filtered by the CustomerId field using MSFax through Access SendObject.
'
' This function assumes the report rptMSFaxInvoices has the default printer set to MSFax
' and the MSFax driver is installed correctly.
' *******************************************************************************************
'
Function MSFaxInvoices()

'********************************************************************************************
' Diming all variables
'********************************************************************************************

Dim dbsNorthwind As Database
Dim rstCustomers As Recordset

'********************************************************************************************
' Setting database and recordset variables
'********************************************************************************************

Set dbsNorthwind = CurrentDb()
Set rstCustomers = dbsNorthwind.OpenRecordset("Customers", dbOpenDynaset) ' Set Recordset to Customers table

'********************************************************************************************
' Walking through the Customers recordset until end of file, setting the global variable
' strInvoicesWhere to the current where and using SendObject passing
' customers fax number and report name.
'********************************************************************************************

If MsgBox("Do you want to fax invoices" & Chr(13) & "to all customers using MSFax?", 4) = 6 Then
With rstCustomers
Do Until .EOF
strInvoiceWhere = "[customerid] = '" & ![CustomerID] & "'" ' sets global strInvoiceWhere
DoCmd.SendObject acReport, "rptMSFaxInvoice", acFormatRTF, "[fax:" & ![Fax] & "]", , , , , False ' Runs Report to MSFax
.MoveNext ' Move to next record in Recordset
Loop
End With
End If


End Function

See where the sendobject uses "Fax:" and then adds the number from the table. This works great. Outlook sees the "Fax" then uses the Fax client and your phone line to fax the items.

Hope This Helps,
Jeremy
WZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top