Vb .net ou vb4 gestion paramètre 'depuis(.from)' - outlook
intoxacls
Messages postés4Date d'inscriptionvendredi 1 octobre 2004StatutMembreDernière intervention 6 octobre 2004
-
6 oct. 2004 à 09:51
cs_Benouille
Messages postés215Date d'inscriptionjeudi 24 octobre 2002StatutMembreDernière intervention 7 septembre 2007
-
7 oct. 2004 à 00:44
Bonjour
Je voudrais modifier une appli développée en vb .net (console) de façon à paramétrer un équivalent d'un paramètre .from pour envoyer un email d'un réseau local vers une adresse email extérieure en passant par un code utilisateur outlook autorisé.
Dans l'exemple suivant le paramètre .from n'est pas accepté.
exemple:
oFrom = "???????"
Try
Dim oAttachments As Object
oLapp = CreateObject("Outlook.application")
oItem = oLapp.CreateItem(0)
oRecipient = wDveNumEmail
oAttachments = oItem.attachments
oAttachments.Add(wFichierAenvoyer, , 1, wDveDoc)
With oItem
.Subject = oSubject''''''''
.from = oFrom
.to = oRecipient
.body = Chr(10) & Chr(10) & _
" Veuillez trouvez ci-joint un fichier vous étant addressé lisible par Adobe Acrobat Reader." & _
Chr(10) & _
" Merci de votre collaboration." & _
.....
.Send()
End With
oLapp = Nothing
oItem = Nothing
Catch ex As Exception
wConsoleLigne = DateTime.Now & " " & "envoi_sortant_email " & " pour " & wDveNum & _
" " & Chr(10) & " from:" & oFrom & Chr(10) & " to:" & oRecipient & Chr(10) & ex.ToString
messGo = "go"
Call ConsoleLog()
Exit Sub
Finally
End Try
Merci de votre intervention
A voir également:
Vb .net ou vb4 gestion paramètre 'depuis(.from)' - outlook