Platform SDK: Fax Services |
The FaxServer object is used by a fax client Visual Basic application to manage a connection to the fax service. You can also retrieve and set the properties of FaxServer objects, such as settings for retransmission, branding, archiving and cover pages; discount rate periods; and the status of the fax server queue.
The FaxServer object has the following methods and properties:
Use the FaxServer object to connect to and disconnect from an active fax server. After you obtain a connection, you can call the following methods to create other objects you need.
Note A fax client application must call the Connect method to initiate a connection with an active fax server before accessing most other objects that begin with Fax. (A fax server connection is not required to access a FaxTiff object.)
You should not implement this class. The Microsoft standard implementation provides complete functionality. You can use the Visual Basic Object Browser to view the FaxServer object's type library information in Visual Basic syntax.
To create a FaxServer object, call the Visual Basic CreateObject function as illustrated in the following sample:
Dim FaxServer as Object Set FaxServer = CreateObject("FaxServer.FaxServer")
Following is a list of the Visual Basic methods of FaxServer objects.
Method | Visual Basic Example |
---|---|
Connect | |
Connects a fax client application to an active fax server. |
Dim FS As Object Dim ServerName As String ServerName = "\\MyServer" FS.Connect(ServerName) |
CreateDocument | |
Creates a FaxDoc object. The object allows a user to create and send a fax document. |
Dim FD As Object Dim FS As Object Dim FileName As String FileName = "MyFile" FD = FS.CreateDocument(FileName) |
Disconnect | |
Terminates a connection to a fax server. |
Dim FS As Object FS.Disconnect() |
GetJobs | |
Creates a FaxJobs object. The object allows enumeration of the queued jobs for the connected fax server. |
Dim FJ As Object Dim FS As Object FJ = FS.GetJobs() |
GetPorts | |
Creates a FaxPorts object. The object allows enumeration of fax port configuration information for the connected fax server. |
Dim FP As Object Dim FS As Object FP = FS.GetPorts() |
Following is a list of the Visual Basic properties of FaxServer objects.
Property | Visual Basic Example |
---|---|
ArchiveDirectory STRING Read/Write |
|
Location at which the fax server archives outgoing fax transmissions. |
' Retrieve Dim strArchDir As String strArchDir = objFaxServer.ArchiveDirectory ' Assign objFaxServer.ArchiveDirectory = "MyDirectory" |
ArchiveOutboundFaxes LONG Read/Write |
|
Flag that indicates whether the fax server archives a copy of all outgoing fax transmissions. Set the ArchiveOutboundFaxes property to a nonzero value to archive faxes in the directory specified by the ArchiveDirectory property. |
' Retrieve Dim lArchiveOutFaxes As Long lArchiveOutFaxes = objFaxServer.ArchiveOutboundFaxes ' Assign objFaxServer.ArchiveOutboundFaxes = – 1 |
Branding LONG Read/Write |
|
Flag that indicates whether the fax server generates a brand (banner) at the top of a fax transmission. If this property is a nonzero value, the fax server generates branding information. |
' Retrieve Dim lBranding As Long lBranding = objFaxServer.Branding ' Assign objFaxServer.Branding = – 1 |
DirtyDays LONG Read/Write |
|
Number of days the fax server retains an unsent fax job in the fax job queue. A value of – 1 indicates that the fax server should not remove the job from the job queue. |
' Retrieve Dim lDirtyDays As Long lDirtyDays = objFaxServer.DirtyDays ' Assign objFaxServer.DirtyDays = 30 |
DiscountRateEndHour INTEGER Read/Write |
|
Hour the discount period ends for outgoing fax transmissions. Valid values for this property are 0 through 23. |
' Retrieve Dim intDiscEndHr As Integer intDiscEndHr = objFaxServer.DiscountRateEndHour ' Assign objFaxServer.DiscountRateEndHour = 7 |
DiscountRateEndMinute INTEGER Read/Write |
|
Minute the discount period ends for outgoing fax transmissions. Valid values for this property are 0 through 59. |
' Retrieve Dim intDiscEndMin As Integer intDiscEndMin = objFaxServer.DiscountRateEndMinute ' Assign objFaxServer.DiscountRateEndMinute= 30 |
DiscountRateStartHour INTEGER Read/Write |
|
Hour the discount period begins for outgoing fax transmissions. Valid values for this property are 0 through 23. |
' Retrieve Dim intDiscStartHr As Integer intDiscStartHr = objFaxServer.DiscountRateStartHour ' Assign objFaxServer.DiscountRateStartHour = 18 |
DiscountRateStartMinute INTEGER Read/Write |
|
Minute the discount period begins for outgoing fax transmissions. Valid values for this property are 0 through 59. |
' Retrieve Dim intDiscStartMin As Integer intDiscStartMin = objFaxServer.DiscountRateStartMinute ' Assign objFaxServer.DiscountRateStartMinute = 00 |
PauseServerQueue LONG Read/Write |
|
Flag that indicates whether the fax server has paused the outbound fax job queue, or whether the queue is active. If this property is a nonzero value, the queue has been paused. A value of zero indicates that the queue is active. Setting this property pauses or resumes the outbound fax job queue. |
' Retrieve Dim lPauseSQueue As Long lPauseSQueue = objFaxServer.PauseServerQueue ' Assign objFaxServer.PauseServerQueue = – 1 |
Retries LONG Read/Write |
|
Number of times the fax server attempts to retransmit an outgoing fax, when the initial transmission fails. A value of zero indicates that the fax server should not attempt to retransmit an outbound job if the first transmission fails. |
' Retrieve Dim lRetries As Long lRetries = objFaxServer.Retries ' Assign objFaxServer.Retries = 5 |
RetryDelay LONG Read/Write |
|
Number of minutes that elapse between retransmission attempts by the fax server. If this property is equal to zero, the fax server will attempt to retransmit the fax job immediately. |
' Retrieve Dim lRetryDelay As Long lRetryDelay = objFaxServer.RetryDelay ' Assign objFaxServer.RetryDelay = 2 |
ServerCoverpage LONG Read/Write |
|
Flag that indicates whether fax client applications can include a user-designed cover page with the fax transmission. If this property is a nonzero value, the client must use the common cover page located on the fax server. A value of zero indicates that the client can use any cover page file. |
' Retrieve Dim lServerCpage As Long lServerCpage = objFaxServer.ServerCoverpage ' Assign objFaxServer.ServerCoverpage = – 1 |
ServerMapiProfile STRING Read/Write |
|
MAPI user profile the fax server uses for routing incoming fax transmissions. |
' Retrieve Dim strMapiPro As String strMapiPro = objFaxServer.ServerMapiProfile ' Assign objFaxServer.ServerMapiProfile = "MyMapiProfile" |
UseDeviceTsid LONG Read/Write |
|
Flag that indicates whether the fax server uses the device's transmitting station identifier (TSID) instead of a user-specified TSID. If this property is a nonzero value, the fax server uses the device's TSID. |
' Retrieve Dim lUseDevTsid As Long lUseDevTsid = objFaxServer.UseDeviceTsid ' Assign objFaxServer.UseDeviceTsid = – 1 |