How to send a fax in vb.net?

Author Topic
Johny Fayad
Member

Joined: 19 Dec 2005
Country:
Posts: 2

Posted: 21 Dec 2005 10:12:45

I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?

I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?
Keith Harrison
Member

Joined: 20 Jan 2006
Country:
Posts: 1

Posted: 20 Jan 2006 16:21:06

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Please note: I have tried this code and although it does work it i not fully tested. It uses the Windows Fax Console on XP.

<pre id=code><font face=courier size=2 id=code>
Imports FAXCOMLib

Public Class Form1
Inherits System.Windows.Forms.Form



#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
&lt;System.Diagnostics.DebuggerStepThrough()&gt; Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(80, 89)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Select File To Send"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(24, 33)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 23)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Send File To Fax"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Form1
'
Me.AcceptButton = Me.Button1
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 144)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Button1})
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Form1"
Me.Text = "FaxIt"
Me.ResumeLayout(False)

End Sub

#End Region



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim fo As New OpenFileDialog()
fo.Filter = "Microsoft Word Document (*.doc)|*.doc| Adobe PDF (*.pdf)|*.pdf"
If fo.ShowDialog = DialogResult.OK Then
If fo.FileName = "" Then
Exit Sub
End If
Else
Exit Sub
End If

Dim fxsvr = New FAXCOMLib.FaxServer()
Dim fxdoc = fxsvr.CreateDocument(fo.FileName)

Try
fxsvr.Connect("KEITH" 'Machine Name

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try
fxdoc.FileName = fo.FileName
fxdoc.FaxNumber = InputBox("Fax Number:", "Enter Fax Number", -1, -1)
fxdoc.RecipientName = ""

Try

fxdoc.Send()

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try

fxsvr.Disconnect()

Catch ex As Exception

MessageBox.Show(ex.message() & ControlChars.CrLf & ControlChars.CrLf & ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub
End Class
</font id=code></pre id=code>

Hope this helps! I had been looking for SDK for Norton Winfax 10 but Symantec and Norton do not support anymore.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Please note: I have tried this code and although it does work it i not fully tested. It uses the Windows Fax Console on XP.

<pre id=code><font face=courier size=2 id=code>
Imports FAXCOMLib

Public Class Form1
Inherits System.Windows.Forms.Form



#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
&lt;System.Diagnostics.DebuggerStepThrough()&gt; Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(80, 89)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Select File To Send"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(24, 33)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 23)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Send File To Fax"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Form1
'
Me.AcceptButton = Me.Button1
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 144)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Button1})
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Form1"
Me.Text = "FaxIt"
Me.ResumeLayout(False)

End Sub

#End Region



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim fo As New OpenFileDialog()
fo.Filter = "Microsoft Word Document (*.doc)|*.doc| Adobe PDF (*.pdf)|*.pdf"
If fo.ShowDialog = DialogResult.OK Then
If fo.FileName = "" Then
Exit Sub
End If
Else
Exit Sub
End If

Dim fxsvr = New FAXCOMLib.FaxServer()
Dim fxdoc = fxsvr.CreateDocument(fo.FileName)

Try
fxsvr.Connect("KEITH" 'Machine Name

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try
fxdoc.FileName = fo.FileName
fxdoc.FaxNumber = InputBox("Fax Number:", "Enter Fax Number", -1, -1)
fxdoc.RecipientName = ""

Try

fxdoc.Send()

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try

fxsvr.Disconnect()

Catch ex As Exception

MessageBox.Show(ex.message() & ControlChars.CrLf & ControlChars.CrLf & ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub
End Class
</font id=code></pre id=code>

Hope this helps! I had been looking for SDK for Norton Winfax 10 but Symantec and Norton do not support anymore.
Johny Fayad
Member

Joined: 19 Dec 2005
Country:
Posts: 2

Posted: 20 Jan 2006 17:17:12

thanks Keith
but I found it
and you can import the FAXCOMEXLIB it's much better

thanks Keith
but I found it
and you can import the FAXCOMEXLIB it's much better
adiel gonzalez
Member

Joined: 30 Jan 2006
Country:
Posts: 1

Posted: 30 Jan 2006 19:01:42

Johny, do you have a sample code you can post on how you got it to work with FAXCOMEXLIB .

Thanks Before Hand,
Adiel

Johny, do you have a sample code you can post on how you got it to work with FAXCOMEXLIB .

Thanks Before Hand,
Adiel
Shahid Baig
Member

Joined: 15 Dec 2005
Country:
Posts: 3

Posted: 24 Feb 2006 14:42:20

If You Want to Handle Fax Through Outlook then i can help you...........

Please Put Topic for it

If You Want to Handle Fax Through Outlook then i can help you...........

Please Put Topic for it
sandeep kumar
Member

Joined: 22 Nov 2007
Country:
Posts: 2

Posted: 22 Nov 2007 08:53:47

Hi, please help me in developing vb.net faxing application.

Get me the architecture, and components, plan required for it.

Thanks
in advance.

Hi, please help me in developing vb.net faxing application.

Get me the architecture, and components, plan required for it.

Thanks
in advance.
sandeep kumar
Member

Joined: 22 Nov 2007
Country:
Posts: 2

Posted: 22 Nov 2007 08:57:32

keith or Any body please help me in developing faxing application in vb.net.

Please give me the plan to develop this application.

its urgent.

Thanks.

keith or Any body please help me in developing faxing application in vb.net.

Please give me the plan to develop this application.

its urgent.

Thanks.
Shameer mp
Member

Joined: 15 Apr 2008
Country:
Posts: 1

Posted: 15 Apr 2008 08:30:00

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
keith or Any body please help me in developing faxing application in vb.net.

Please give me the plan to develop this application.

its urgent.

Thanks.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

You can find the code sample from the below orkut community

www.orkut.com/Community.aspx?cmm=18471066


<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
keith or Any body please help me in developing faxing application in vb.net.

Please give me the plan to develop this application.

its urgent.

Thanks.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

You can find the code sample from the below orkut community

www.orkut.com/Community.aspx?cmm=18471066


Adeel Ghaffar
Member

Joined: 22 Jun 2010
Homepage: link
Country: SA
Posts: 1

Posted: 22 Jun 2010 13:11:08

Hello,
Can you pleease pvovide FaxCom.dll bcz it is necessagy to use FaxComLib method to send fax




Quote<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Please note: I have tried this code and although it does work it i not fully tested. It uses the Windows Fax Console on XP.

<pre id=code><font face=courier size=2 id=code>
Imports FAXCOMLib

Public Class Form1
Inherits System.Windows.Forms.Form



#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
&lt;System.Diagnostics.DebuggerStepThrough()&gt; Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(80, 89)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Select File To Send"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(24, 33)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 23)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Send File To Fax"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Form1
'
Me.AcceptButton = Me.Button1
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 144)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Button1})
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Form1"
Me.Text = "FaxIt"
Me.ResumeLayout(False)

End Sub

#End Region



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim fo As New OpenFileDialog()
fo.Filter = "Microsoft Word Document (*.doc)|*.doc| Adobe PDF (*.pdf)|*.pdf"
If fo.ShowDialog = DialogResult.OK Then
If fo.FileName = "" Then
Exit Sub
End If
Else
Exit Sub
End If

Dim fxsvr = New FAXCOMLib.FaxServer()
Dim fxdoc = fxsvr.CreateDocument(fo.FileName)

Try
fxsvr.Connect("KEITH" 'Machine Name

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try
fxdoc.FileName = fo.FileName
fxdoc.FaxNumber = InputBox("Fax Number:", "Enter Fax Number", -1, -1)
fxdoc.RecipientName = ""

Try

fxdoc.Send()

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try

fxsvr.Disconnect()

Catch ex As Exception

MessageBox.Show(ex.message() & ControlChars.CrLf & ControlChars.CrLf & ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub
End Class
</font id=code></pre id=code>

Hope this helps! I had been looking for SDK for Norton Winfax 10 but Symantec and Norton do not support anymore.


Hello,
Can you pleease pvovide FaxCom.dll bcz it is necessagy to use FaxComLib method to send fax




Quote<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm trying to write an application that send fax to many numbers using a phone line
the idea is to read from a database file the fax numbers and to a specified document to all these numbers

can someone help me with a code?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Please note: I have tried this code and although it does work it i not fully tested. It uses the Windows Fax Console on XP.

<pre id=code><font face=courier size=2 id=code>
Imports FAXCOMLib

Public Class Form1
Inherits System.Windows.Forms.Form



#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents Label1 As System.Windows.Forms.Label
&lt;System.Diagnostics.DebuggerStepThrough()&gt; Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(80, 89)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(128, 23)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Select File To Send"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(24, 33)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 23)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Send File To Fax"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Form1
'
Me.AcceptButton = Me.Button1
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 144)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Button1})
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Form1"
Me.Text = "FaxIt"
Me.ResumeLayout(False)

End Sub

#End Region



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim fo As New OpenFileDialog()
fo.Filter = "Microsoft Word Document (*.doc)|*.doc| Adobe PDF (*.pdf)|*.pdf"
If fo.ShowDialog = DialogResult.OK Then
If fo.FileName = "" Then
Exit Sub
End If
Else
Exit Sub
End If

Dim fxsvr = New FAXCOMLib.FaxServer()
Dim fxdoc = fxsvr.CreateDocument(fo.FileName)

Try
fxsvr.Connect("KEITH" 'Machine Name

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try
fxdoc.FileName = fo.FileName
fxdoc.FaxNumber = InputBox("Fax Number:", "Enter Fax Number", -1, -1)
fxdoc.RecipientName = ""

Try

fxdoc.Send()

Catch ex As Exception

MessageBox.Show(ex.ToString())

End Try

fxsvr.Disconnect()

Catch ex As Exception

MessageBox.Show(ex.message() & ControlChars.CrLf & ControlChars.CrLf & ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub
End Class
</font id=code></pre id=code>

Hope this helps! I had been looking for SDK for Norton Winfax 10 but Symantec and Norton do not support anymore.


Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency