Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send faxes using FaxComLib

Posted on 2013-11-28
1
Medium Priority
?
285 Views
Last Modified: 2013-12-18
Hi, Ive got a grid with a few files (.pdfs)and fax numbers so can anybody give me an example of how to use 'faxcomlib' to send these files by fax??

thanks!
0
Comment
Question by:arcross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
duncanb7 earned 2000 total points
ID: 39687780
You can try this example code only, just idea only and Not completed code for your
code  starting  , other thing you need to analysis and debug it by yourself. It seems it is not easy

Hope understand your question completely. If not please advise it

Duncan

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
<System.Diagnostics.DebuggerStepThrough()> 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

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question