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

faxing (SendObject) w/ Outlook 2k / Win 2k ???

Status
Not open for further replies.

KevCon

Programmer
Jul 11, 2001
44
US
I have successfully tested this routine with Access 2k, Outlook 2k on a WIndows 98SE machine.
however, on Win2k Pro, which has its own fax service (not AWFAX..??), the Microsoft Fax service does not appear as an option in the Add services option of Outlook 2k...

any ideas???
 
I use XP Pro. Here is what works for me...

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