by Jayan Mavelikara (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 9th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
SEND FAX FROM VB Send Wordod DOC,PDF,txt etc. Very easy tyo use Only a few lines of code
'SEND FAX FROM VB
'Very easy tyo use
'Add a reference to Faxcom 1.0 type tybrary ' or better version
'If you find it usefull, good. Let me know if you would like to.
' Jayan Mavelikara
'Jayanp@ gmail.com
'If you have any question here is the document i used
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxinta_n_5cfo.asp
'------------------------------
Private Sub Command1_Click()
Call SendFax
End Sub
Public Function SendFax()
'On Error GoTo err1
Set FaxDoc = CreateObject("FAXCOMEX.FaxDocument")
'Set file name of document.
FaxDoc.body = "C:\Faxtemp\Faxtester\data type.pdf" 'Send this document- Give a valid path '***MUST***
' FaxDoc.body = "C:\Faxtemp\Faxtester\data type.doc"
FaxDoc.DocumentName = "Test Fax"
FaxDoc.Recipients.Add ("97798789") 'Sending Number ' Must '9 for prefix in my case.
'Set the sender properties.
FaxDoc.Sender.Name = "Jayan Mavelikara"
FaxDoc.Sender.FaxNumber = "18006728282" 'Put a valid number to avoid error
'
'Submit the document to the connected fax server and get back the job ID.
' JobID = FaxDoc.ConnectedSubmit(FaxServer)
JobId = FaxDoc.Submit("Regent") 'Fax server name Regent which can be a remote server.
'------------------------
Set FaxDoc = Nothing
Set FaxServer = Nothing
Exit Function
err1:
' App.LogEvent Err.Number & ";" & "Fax.Send method -" & Err.Description
MsgBox Err.Description
End Function
No comments have been posted about SEND FAX FROM VB Send Wordod DOC,PDF,txt etc. Very easy tyo use Only a few lines of code. Why not be the first to post a comment about SEND FAX FROM VB Send Wordod DOC,PDF,txt etc. Very easy tyo use Only a few lines of code.