Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Fax using VFP6.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00535467
Message ID:
00538482
Vues:
25
The full reference for the FaxServer object is in the MSDN at the URL:
mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2001JAN\1033\fax.chm::/hh/fax/faxcomvb_836n.htm
(your path may differ) or on the web at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/hh/fax/faxcomvb_836n.asp
(you may or may not need an MSDN membership to get to this page.. I'm not sure anymore with all of MS's licencing changes!!)

- Bill

(ps: for your use, some of this reference is at the end of this message... there are many more pages in the MSDN that relate to it, too)
>Where did you read about this faxserver.faxserver object?
>bb

>>Take a look at this (all error trapping removed for brevity; This requires Microsoft Fax be installed):
>>
>>loFaxServer=createobject('faxserver.faxserver')
>>loFaxServer.connect( '\\'+alltrim(LEFT(SYS(0),at('#',SYS(0))-1) ) )

Platform SDK: Fax Services
FaxServer Object (Visual Basic)
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:

Methods to initiate and terminate connections with a fax server.
Methods to create FaxJobs, FaxPorts and FaxDoc objects.
Properties to set and retrieve individual attributes of FaxServer objects.
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.

The GetJobs method to create a FaxJobs object. Use this object to create FaxJob objects and enumerate the fax jobs associated with a connected fax server.
The GetPorts method to create a FaxPorts object. Use this object to create FaxPort objects and enumerate fax port configuration information for a connection to a fax server.
The CreateDocument method to create a FaxDoc object. Use this object to transmit a fax and to retrieve and set the properties of FaxDoc objects.
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.)

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 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


Built on Tuesday, October 03, 2000
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform