OVH Cloud OVH Cloud

Envoie de fax

5 réponses
Avatar
Etudiant
bonjour,
existe t'il un moyen d'envoyer des fax a partir d'une application vb.Net?
merci

5 réponses

Avatar
Etudiant
Etudiant a écrit :
bonjour,
existe t'il un moyen d'envoyer des fax a partir d'une application vb.Net?
merci


j'ai trouve ceci mais si qqun pouvait le traduire en vb ca m'aiderait merci

Lancez le programme Convert.exe se trouvant dans le dossier
d'Olifax/Voix (c:Olifaxvx).

Débutez une liaison DDE avec DdeInitiate("Convert");
Indiquez le nom de la société avec DdeExecute("SOCIETE:Le nom de la
société") (facultatif)
Indiquez le nom du destinataire avec DdeExecute("NOM:Paul Durand")
(facultatif)
Indiquez le numéro du destinataire avec DdeExecute("NUMERO:0383309000")
Terminez la liaison DDE avec DdeTerminate


Sous Windows 98, 98SE ou Millennium, lancez l'impression sur Oliprint.
Sous Windows XP Professionnel/Familiale, 2000 Professionnel ou NT4
Workstation, lancez l'impression sur Olitec Fax.

Vous pouvez interrompre le dialogue DDE avec la commande
DdeExecute("ANNULER") .


Exemple en Visual Basic :

Sub Fax()
' Ouvre un canal DDE avec l'application Convert
Chan = DDEInitiate("Convert", "Convert")

' Renseigne le champ Société
DDEExecute Chan, "SOCIETE:Le nom de la société"

' Renseigne le champ Nom
DDEExecute Chan, "NOM:Paul Durand"

' Renseigne le champ Numéro
DDEExecute Chan, "NUMERO:0383309000"

' Ferme le canal DDE
DDETerminate Chan
End Sub

Vous pouvez interrompre le dialogue DDE avec la commande DDEExecute
Chan, "ANNULER"
Avatar
SoizicT
salut,
moi aussi je cherchais à envoyer un fax et j'ai enfin réussi. Attention ce
code ne fonctionne que sur une machine ayant un service fax (mais ça
fonctionne super bien)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

'Declare fax variables...
Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
Dim JobID As Object

Try

'Connect to the fax server...
objFaxServer.Connect("") 'Nom du serveur par lequel envoyé le fax

'Set the fax body
objFaxDocument.Body = "c:Nouveau Document texte.txt" '
"c:fax.txt"

'Name the document
objFaxDocument.DocumentName = "My First Fax"

'Set the fax priority
objFaxDocument.Priority =
FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH

'Add the recipient with the fax number 12225550100
objFaxDocument.Recipients.Add("555-5555", "Bud") 'Attention s'il
y a un standard rajouter le numéro pour sortir et ,

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

'Provide the cover page note
objFaxDocument.Note = "Here is the info you requested"

objFaxDocument.Subject = "Today's fax"

'Set the sender properties.
objFaxDocument.Sender.Title = "Mr."
objFaxDocument.Sender.Name = "Bob"
objFaxDocument.Sender.City = "Cleveland Heights"
objFaxDocument.Sender.State = "Ohio"
objFaxDocument.Sender.Company = "Microsoft"
objFaxDocument.Sender.Country = "USA"
objFaxDocument.Sender.Email = ""
objFaxDocument.Sender.FaxNumber = "12165555554"
objFaxDocument.Sender.HomePhone = "12165555555"
objFaxDocument.Sender.OfficeLocation = "Downtown"
objFaxDocument.Sender.OfficePhone = "12165555553"
objFaxDocument.Sender.StreetAddress = "123 Main Street"
objFaxDocument.Sender.TSID = "Office fax machine"
objFaxDocument.Sender.ZipCode = "44118"
objFaxDocument.Sender.BillingCode = "23A54"
objFaxDocument.Sender.Department = "Accts Payable"

'Save sender information as default
objFaxDocument.Sender.SaveDefaultSender()

'Submit the document to the connected fax server
'and get back the job ID.
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

MsgBox("The Job ID is :" & JobID(0))

Catch exc As Exception

MsgBox("Exception message: " & exc.Message & vbCrLf & "Exception
Source: " & exc.Source)

End Try

End Sub

Bon courage

Soizic

"Etudiant" a écrit :

Etudiant a écrit :
> bonjour,
> existe t'il un moyen d'envoyer des fax a partir d'une application vb.Net?
> merci
j'ai trouve ceci mais si qqun pouvait le traduire en vb ca m'aiderait merci

Lancez le programme Convert.exe se trouvant dans le dossier
d'Olifax/Voix (c:Olifaxvx).

Débutez une liaison DDE avec DdeInitiate("Convert");
Indiquez le nom de la société avec DdeExecute("SOCIETE:Le nom de la
société") (facultatif)
Indiquez le nom du destinataire avec DdeExecute("NOM:Paul Durand")
(facultatif)
Indiquez le numéro du destinataire avec DdeExecute("NUMERO:0383309000")
Terminez la liaison DDE avec DdeTerminate


Sous Windows 98, 98SE ou Millennium, lancez l'impression sur Oliprint.
Sous Windows XP Professionnel/Familiale, 2000 Professionnel ou NT4
Workstation, lancez l'impression sur Olitec Fax.

Vous pouvez interrompre le dialogue DDE avec la commande
DdeExecute("ANNULER") .


Exemple en Visual Basic :

Sub Fax()
' Ouvre un canal DDE avec l'application Convert
Chan = DDEInitiate("Convert", "Convert")

' Renseigne le champ Société
DDEExecute Chan, "SOCIETE:Le nom de la société"

' Renseigne le champ Nom
DDEExecute Chan, "NOM:Paul Durand"

' Renseigne le champ Numéro
DDEExecute Chan, "NUMERO:0383309000"

' Ferme le canal DDE
DDETerminate Chan
End Sub

Vous pouvez interrompre le dialogue DDE avec la commande DDEExecute
Chan, "ANNULER"




Avatar
Soizic T
J'ai oublié mais il te faut également intégrer la référence suivante :
fxscommex.dll


"Etudiant" a écrit :

Etudiant a écrit :
> bonjour,
> existe t'il un moyen d'envoyer des fax a partir d'une application vb.Net?
> merci
j'ai trouve ceci mais si qqun pouvait le traduire en vb ca m'aiderait merci

Lancez le programme Convert.exe se trouvant dans le dossier
d'Olifax/Voix (c:Olifaxvx).

Débutez une liaison DDE avec DdeInitiate("Convert");
Indiquez le nom de la société avec DdeExecute("SOCIETE:Le nom de la
société") (facultatif)
Indiquez le nom du destinataire avec DdeExecute("NOM:Paul Durand")
(facultatif)
Indiquez le numéro du destinataire avec DdeExecute("NUMERO:0383309000")
Terminez la liaison DDE avec DdeTerminate


Sous Windows 98, 98SE ou Millennium, lancez l'impression sur Oliprint.
Sous Windows XP Professionnel/Familiale, 2000 Professionnel ou NT4
Workstation, lancez l'impression sur Olitec Fax.

Vous pouvez interrompre le dialogue DDE avec la commande
DdeExecute("ANNULER") .


Exemple en Visual Basic :

Sub Fax()
' Ouvre un canal DDE avec l'application Convert
Chan = DDEInitiate("Convert", "Convert")

' Renseigne le champ Société
DDEExecute Chan, "SOCIETE:Le nom de la société"

' Renseigne le champ Nom
DDEExecute Chan, "NOM:Paul Durand"

' Renseigne le champ Numéro
DDEExecute Chan, "NUMERO:0383309000"

' Ferme le canal DDE
DDETerminate Chan
End Sub

Vous pouvez interrompre le dialogue DDE avec la commande DDEExecute
Chan, "ANNULER"




Avatar
alan
Ca marche pas :
L'objet COM avec le CLSID {FA21F4C6-5C4C-11D1-83CF-00C04FB6E984} n'est pas
valide ou n'est pas inscrit.

"SoizicT" a écrit :

salut,
moi aussi je cherchais à envoyer un fax et j'ai enfin réussi. Attention ce
code ne fonctionne que sur une machine ayant un service fax (mais ça
fonctionne super bien)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

'Declare fax variables...
Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
Dim JobID As Object

Try

'Connect to the fax server...
objFaxServer.Connect("") 'Nom du serveur par lequel envoyé le fax

'Set the fax body
objFaxDocument.Body = "c:Nouveau Document texte.txt" '
"c:fax.txt"

'Name the document
objFaxDocument.DocumentName = "My First Fax"

'Set the fax priority
objFaxDocument.Priority =
FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH

'Add the recipient with the fax number 12225550100
objFaxDocument.Recipients.Add("555-5555", "Bud") 'Attention s'il
y a un standard rajouter le numéro pour sortir et ,

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

'Provide the cover page note
objFaxDocument.Note = "Here is the info you requested"

objFaxDocument.Subject = "Today's fax"

'Set the sender properties.
objFaxDocument.Sender.Title = "Mr."
objFaxDocument.Sender.Name = "Bob"
objFaxDocument.Sender.City = "Cleveland Heights"
objFaxDocument.Sender.State = "Ohio"
objFaxDocument.Sender.Company = "Microsoft"
objFaxDocument.Sender.Country = "USA"
objFaxDocument.Sender.Email = ""
objFaxDocument.Sender.FaxNumber = "12165555554"
objFaxDocument.Sender.HomePhone = "12165555555"
objFaxDocument.Sender.OfficeLocation = "Downtown"
objFaxDocument.Sender.OfficePhone = "12165555553"
objFaxDocument.Sender.StreetAddress = "123 Main Street"
objFaxDocument.Sender.TSID = "Office fax machine"
objFaxDocument.Sender.ZipCode = "44118"
objFaxDocument.Sender.BillingCode = "23A54"
objFaxDocument.Sender.Department = "Accts Payable"

'Save sender information as default
objFaxDocument.Sender.SaveDefaultSender()

'Submit the document to the connected fax server
'and get back the job ID.
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

MsgBox("The Job ID is :" & JobID(0))

Catch exc As Exception

MsgBox("Exception message: " & exc.Message & vbCrLf & "Exception
Source: " & exc.Source)

End Try

End Sub

Bon courage

Soizic

"Etudiant" a écrit :

> Etudiant a écrit :
> > bonjour,
> > existe t'il un moyen d'envoyer des fax a partir d'une application vb.Net?
> > merci
> j'ai trouve ceci mais si qqun pouvait le traduire en vb ca m'aiderait merci
>
> Lancez le programme Convert.exe se trouvant dans le dossier
> d'Olifax/Voix (c:Olifaxvx).
>
> Débutez une liaison DDE avec DdeInitiate("Convert");
> Indiquez le nom de la société avec DdeExecute("SOCIETE:Le nom de la
> société") (facultatif)
> Indiquez le nom du destinataire avec DdeExecute("NOM:Paul Durand")
> (facultatif)
> Indiquez le numéro du destinataire avec DdeExecute("NUMERO:0383309000")
> Terminez la liaison DDE avec DdeTerminate
>
>
> Sous Windows 98, 98SE ou Millennium, lancez l'impression sur Oliprint.
> Sous Windows XP Professionnel/Familiale, 2000 Professionnel ou NT4
> Workstation, lancez l'impression sur Olitec Fax.
>
> Vous pouvez interrompre le dialogue DDE avec la commande
> DdeExecute("ANNULER") .
>
>
> Exemple en Visual Basic :
>
> Sub Fax()
> ' Ouvre un canal DDE avec l'application Convert
> Chan = DDEInitiate("Convert", "Convert")
>
> ' Renseigne le champ Société
> DDEExecute Chan, "SOCIETE:Le nom de la société"
>
> ' Renseigne le champ Nom
> DDEExecute Chan, "NOM:Paul Durand"
>
> ' Renseigne le champ Numéro
> DDEExecute Chan, "NUMERO:0383309000"
>
> ' Ferme le canal DDE
> DDETerminate Chan
> End Sub
>
> Vous pouvez interrompre le dialogue DDE avec la commande DDEExecute
> Chan, "ANNULER"
>
>


Avatar
Zoury
Salut!

Tu dois probablement installer le "Windows Fax Service". Je te suggère de
faire une recherche sur la MSDN à ce sujet..

--
Cordialement
Yanick
MVP pour Visual Basic
"alan" a écrit dans le message de
news:
Ca marche pas :
L'objet COM avec le CLSID {FA21F4C6-5C4C-11D1-83CF-00C04FB6E984} n'est


pas
valide ou n'est pas inscrit.

"SoizicT" a écrit :

> salut,
> moi aussi je cherchais à envoyer un fax et j'ai enfin réussi. Attention


ce
> code ne fonctionne que sur une machine ayant un service fax (mais ça
> fonctionne super bien)
>
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>
> 'Declare fax variables...
> Dim objFaxServer As New FAXCOMEXLib.FaxServer
> Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
> Dim JobID As Object
>
> Try
>
> 'Connect to the fax server...
> objFaxServer.Connect("") 'Nom du serveur par lequel envoyé


le fax
>
> 'Set the fax body
> objFaxDocument.Body = "c:Nouveau Document texte.txt" '
> "c:fax.txt"
>
> 'Name the document
> objFaxDocument.DocumentName = "My First Fax"
>
> 'Set the fax priority
> objFaxDocument.Priority > > FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH
>
> 'Add the recipient with the fax number 12225550100
> objFaxDocument.Recipients.Add("555-5555", "Bud") 'Attention


s'il
> y a un standard rajouter le numéro pour sortir et ,
>
> 'Choose to attach the fax to the fax receipt
> objFaxDocument.AttachFaxToReceipt = True
>
> 'Provide the cover page note
> objFaxDocument.Note = "Here is the info you requested"
>
> objFaxDocument.Subject = "Today's fax"
>
> 'Set the sender properties.
> objFaxDocument.Sender.Title = "Mr."
> objFaxDocument.Sender.Name = "Bob"
> objFaxDocument.Sender.City = "Cleveland Heights"
> objFaxDocument.Sender.State = "Ohio"
> objFaxDocument.Sender.Company = "Microsoft"
> objFaxDocument.Sender.Country = "USA"
> objFaxDocument.Sender.Email = ""
> objFaxDocument.Sender.FaxNumber = "12165555554"
> objFaxDocument.Sender.HomePhone = "12165555555"
> objFaxDocument.Sender.OfficeLocation = "Downtown"
> objFaxDocument.Sender.OfficePhone = "12165555553"
> objFaxDocument.Sender.StreetAddress = "123 Main Street"
> objFaxDocument.Sender.TSID = "Office fax machine"
> objFaxDocument.Sender.ZipCode = "44118"
> objFaxDocument.Sender.BillingCode = "23A54"
> objFaxDocument.Sender.Department = "Accts Payable"
>
> 'Save sender information as default
> objFaxDocument.Sender.SaveDefaultSender()
>
> 'Submit the document to the connected fax server
> 'and get back the job ID.
> JobID = objFaxDocument.ConnectedSubmit(objFaxServer)
>
> MsgBox("The Job ID is :" & JobID(0))
>
> Catch exc As Exception
>
> MsgBox("Exception message: " & exc.Message & vbCrLf &


"Exception
> Source: " & exc.Source)
>
> End Try
>
> End Sub
>
> Bon courage
>
> Soizic
>
> "Etudiant" a écrit :
>
> > Etudiant a écrit :
> > > bonjour,
> > > existe t'il un moyen d'envoyer des fax a partir d'une application


vb.Net?
> > > merci
> > j'ai trouve ceci mais si qqun pouvait le traduire en vb ca m'aiderait


merci
> >
> > Lancez le programme Convert.exe se trouvant dans le dossier
> > d'Olifax/Voix (c:Olifaxvx).
> >
> > Débutez une liaison DDE avec DdeInitiate("Convert");
> > Indiquez le nom de la société avec DdeExecute("SOCIETE:Le nom de la
> > société") (facultatif)
> > Indiquez le nom du destinataire avec DdeExecute("NOM:Paul Durand")
> > (facultatif)
> > Indiquez le numéro du destinataire avec


DdeExecute("NUMERO:0383309000")
> > Terminez la liaison DDE avec DdeTerminate
> >
> >
> > Sous Windows 98, 98SE ou Millennium, lancez l'impression sur Oliprint.
> > Sous Windows XP Professionnel/Familiale, 2000 Professionnel ou NT4
> > Workstation, lancez l'impression sur Olitec Fax.
> >
> > Vous pouvez interrompre le dialogue DDE avec la commande
> > DdeExecute("ANNULER") .
> >
> >
> > Exemple en Visual Basic :
> >
> > Sub Fax()
> > ' Ouvre un canal DDE avec l'application Convert
> > Chan = DDEInitiate("Convert", "Convert")
> >
> > ' Renseigne le champ Société
> > DDEExecute Chan, "SOCIETE:Le nom de la société"
> >
> > ' Renseigne le champ Nom
> > DDEExecute Chan, "NOM:Paul Durand"
> >
> > ' Renseigne le champ Numéro
> > DDEExecute Chan, "NUMERO:0383309000"
> >
> > ' Ferme le canal DDE
> > DDETerminate Chan
> > End Sub
> >
> > Vous pouvez interrompre le dialogue DDE avec la commande DDEExecute
> > Chan, "ANNULER"
> >
> >