Platform SDK: Fax Services

FaxJob Object (Visual Basic)

The FaxJob object permits a fax client Visual Basic application to access the job status for incoming and outgoing fax transmissions, and to pause, resume, cancel or restart a fax job. You can also use the object to retrieve information about fax jobs. Information includes, among other items, the fax number to which the fax server will send the transmission, job attributes, and recipient and sender information. There is one FaxJob object for each queued job associated with the server.

The FaxJob object has the following methods and properties:

When to Implement

You should not implement this class. The Microsoft standard implementation provides complete functionality. You can use the Visual Basic Object Browser to view the FaxJob object's type library information in Visual Basic syntax.

To create a FaxJob object

  1. Call the Visual Basic CreateObject function to create a FaxServer object.
  2. Call the GetJobs method of the FaxServer object to create a FaxJobs object on the connected fax server.
  3. Retrieve the Count property and then the Item property for the FaxJobs collection to create a FaxJob object.

Following is a list of the Visual Basic methods of FaxJob objects.

Method Visual Basic Example
Refresh  
Updates FaxJob object information for the associated fax job.

Dim FJ as Object
FJ.Refresh()
SetStatus  
Changes the job status of a specified FaxJob object. Call this method to pause, resume, cancel, or restart a specified fax job.

Dim FJ as Object
Dim Command As Long
Command = JC_DELETE
FJ.SetStatus(Command)

Following is a list of the Visual Basic properties of FaxJob objects.

Property Visual Basic Example
BillingCode
STRING
Read-only
 
Application- or server-specific billing code that applies to the fax job. Billing codes are optional.

Dim strBillCode As String
strBillCode = objFaxJob.BillingCode
DeviceStatus
STRING
Read-only
 
String that describes the status of the port associated with the fax job. For a list of device status strings, see IFaxJob::get_DeviceStatus.

Dim strDevStat As String
strDevStat = objFaxJob.DeviceStatus
DiscountSend
LONG
Read-only
 
Value that indicates whether the fax server transmits fax jobs during the discount rate period. A nonzero value indicates that transmission will be during the discount period. A value of zero indicates that the fax service sends faxes immediately.

Dim lDiscountSend As Long
lDiscountSend = objFaxJob.DiscountSend
DisplayName
STRING
Read-only
 
User-friendly display name to associate with the fax job.

Dim strDisplayName As String
strDisplayName = objFaxJob.DisplayName
FaxNumber
STRING
Read-only
 
Fax number to which the fax server will transmit the outbound fax job.

Dim strFaxNumber As String
strFaxNumber = objFaxJob.FaxNumber
JobId
LONG
Read-only
 
Number that uniquely identifies the specified fax job.

Dim lJobId As Long
lJobId = objFaxJob.JobId
PageCount
LONG
Read-only
 
Total number of pages associated with the outbound fax job.

Dim lPageCount As Long
lPageCount = objFaxJob.PageCount
QueueStatus
STRING
Read-only
 
String that describes the queue status of the specified fax job. For a list of device status strings, see IFaxJob::get_QueueStatus.

Dim strQStatus As String
strQStatus = objFaxJob.QueueStatus
RecipientName
STRING
Read-only
 
Name of the recipient of the fax job.

Dim strRecName As String
strRecName = objFaxJob.RecipientName
SenderCompany
STRING
Read-only
 
Company name of the sender associated with the outbound fax job.

Dim strSCompany As String
strSCompany = objFaxJob.SenderCompany
SenderDept
STRING
Read-only
 
Company name of the sender associated with the outbound fax job.

Dim strSDept As String
strSDept = objFaxJob.SenderDept
SenderName
STRING
Read-only
 
Name of the sender associated with the outbound fax job.

Dim strSName As String
strSName = objFaxJob.SenderName
Tsid
STRING
Read-only
 
Transmitting station identifier (TSID) to associate with the fax job.

Dim strTsid As String
strTsid = objFaxJob.Tsid
Type
LONG
Read-only
 
Type of fax job represented by the FaxJob object. For a list of job type strings, see IFaxJob::get_Type.

Dim lType As Long
lType = objFaxJob.Type
UserName
STRING
Read-only
 
Name of the user who submitted the outbound fax job to the job queue.

Dim strUName As String
strUName = objFaxJob.UserName