-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: LovedJohnySmith
Message 2 in Discussion

Good Day Velu,     When you fax a document, the fax service runs a shell 
command to search for the document type, and then the fax service calls the 
"print to" verb for that document type. The fax service runs the "print to" 
verb. If the "print to" verb succeeds, the fax service generates a Tagged Image 
File Format (.tiff) output file for that document.  Steps to follow:    1. 
Start Microsoft Visual Basic 6.0. The New Project dialog box appears.  2. On 
the New tab, click Standard EXE, and then click Open.  3. On the Project menu, 
click References.   4. In the References - Project1 dialog box, click Microsoft 
Fax Service Extended COM Type Library, and then click OK.

Note You must install Fax Services to add the Microsoft Fax Service Extended 
COM Type Library reference.  5. In the Project - Project1 window, right-click 
the Form1.frm form, and then click View Code.  6. In the Project1 - Form1 
(Code) window, add the following code.

Note The SampleHTMLFile placeholder in this code is for a sample HTML file. The 
sender and recipient contact information is fictitious. //VB.NET Dim 
FaxDocumentObj As New FAXCOMEXLib.FaxDocument
Dim FaxServerObj As New FAXCOMEXLib.FaxServer
Dim JobIDObj As Variant

'Error handling.
On Error GoTo Error_Handler

'Connect to the fax server.
FaxServerObj.Connect ""

'Set the fax body.
FaxDocumentObj.Body = "c:\<SampleHTMLFile>"

'Name the document.
FaxDocumentObj.DocumentName = "First Fax"

'Set the fax priority.
FaxDocumentObj.Priority = fptHIGH

'Add the recipient with the fax number 2065552626.
FaxDocumentObj.Recipients.Add "2065552626", "<Recipient>"

'Choose to attach the fax to the fax receipt.
FaxDocumentObj.AttachFaxToReceipt = True

'Set the cover page type and the path of the cover page.
FaxDocumentObj.CoverPageType = fcptSERVER
FaxDocumentObj.CoverPage = "generic"

'Provide the cover page note.
FaxDocumentObj.Note = "This contains the information you requested."

'Provide the address for the fax receipt.
FaxDocumentObj.ReceiptAddress = "[EMAIL PROTECTED]"

'Set the receipt type to e-mail.
FaxDocumentObj.ReceiptType = frtMAIL

'Specify that the fax is to be sent at a particular time
FaxDocumentObj.ScheduleType = fstSPECIFIC_TIME
'CDate converts the time to the Date data type
FaxDocumentObj.ScheduleTime = CDate("6:25:12 PM")

FaxDocumentObj.Subject = "Today's fax"

'Set the sender properties.
FaxDocumentObj.Sender.Title = "Mr."
FaxDocumentObj.Sender.Name = "Sender_Name"
FaxDocumentObj.Sender.City = "Sender_City"
FaxDocumentObj.Sender.State = "Sender_State"
FaxDocumentObj.Sender.Company = "Sender_Company"
FaxDocumentObj.Sender.Country = "Sender_Country"
FaxDocumentObj.Sender.Email = "[EMAIL PROTECTED]"
FaxDocumentObj.Sender.FaxNumber = "4255550167"
FaxDocumentObj.Sender.HomePhone = "4255550987"
FaxDocumentObj.Sender.OfficeLocation = "My_Location"
FaxDocumentObj.Sender.OfficePhone = "4255550334"
FaxDocumentObj.Sender.StreetAddress = "123 Main Street"
FaxDocumentObj.Sender.TSID = "Office Fax"
FaxDocumentObj.Sender.ZipCode = "44118"
FaxDocumentObj.Sender.BillingCode = "23A54"
FaxDocumentObj.Sender.Department = "Accts Payable"

'Save sender information as default.
FaxDocumentObj.Sender.SaveDefaultSender

'Submit the document to the connected fax server, and retrieve the job ID.

JobIDObj = FaxDocumentObj.ConnectedSubmit(FaxServerObj)

MsgBox "The Job ID is :" & JobIDObj(0)
Exit Sub

Error_Handler:
    'Implement error handling at the end of your subroutine. This 
implementation is for demonstration purposes
    MsgBox "Error number: " & Hex(Err.Number) & ", " & Err.Description   If you 
still not clear from this asethetic example, pls lemmi noe., ill give one more 
asethetic example   thanx, Smith

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to