Hi markbeeson,
Here you go:-
Firstly you have to have the fax system installed on Windows XP and add the Fax reference to your project.
Place the following code in the Declarations
Public g_objFaxDocument As New FAXCOMEXLib.FaxDocument
Public g_objFaxSender As FaxSender
This next bit of code goes in a sub like commandbuttton1_click()
'Error handling
On Error GoTo Error_Handler
'Remove the previous recipient, if there is one. Otherwise, the fax would be sent to
'recipients that accumulate in the FaxRecipients collection from each previous use of the form.
If g_objFaxDocument.Recipients.Count = 1 Then g_objFaxDocument.Recipients.Remove (1)
'Set no cover page as default
g_objFaxDocument.CoverPageType = fcptNONE
'Set the rest of the fax document properties
g_objFaxDocument.Note = ""
g_objFaxDocument.Subject = "enter whatever subject you like here" 'or you can have a text box that you assing a variable to and then put the variable name here with out the speech marks.
g_objFaxDocument.Recipients.Add faxnum.Text, faxname.Text 'fanum.text and faxname.text are the names of texboxes on a the form.
g_objFaxDocument.Sender.Name = "your name"
g_objFaxDocument.Sender.FaxNumber = "your fax number"
g_objFaxDocument.Sender.OfficePhone = "your phone number"
'Include the attachment if the attachment checkbox is selected
g_objFaxDocument.Body = "document you want to fax" ' if you are faxing say a word document you would use g_objFaxDocument.Body = "c:\my documents\your fax.doc"
'Submit the document to the server
Call g_objFaxDocument.Submit(""
Exit Sub
Error_Handler:
MsgBox "Error number: " & Hex(Err.Number) & ", " & Err.Description
Err.Clear
Hope this makes sense.
Remember you also have to add the fax reference to your project.
Let me know if you have problems you can e-mail me if you like. symon@eu4ic-it.co.uk
Cheers
Symon.
Everything has an answer, it's just knowing the right question to ask. !!!!