begin process at 2012 02 10 00:59:07
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

VBA

 > OUTLOOK SANS QUESTION

OUTLOOK SANS QUESTION


 Information sur la source

Note :
9 / 10 - par 2 personnes
9,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :VBA Niveau :Débutant Date de création :30/07/2003 Date de mise à jour :30/07/2003 11:31:37 Vu :6 127

Auteur : davlefou

Ecrire un message privé
Site perso
Commentaire sur cette source (5)
Ajouter un commentaire et/ou une note

 Description

Il faut pour bien fonctionner:
Microsoft ADO 2.5 minimum
Microsoft CDO pour Windows 2000 ou Microsoft CDO pour Exchange 2000
Non testé sous windows 9x
Ca marche, mais il faut chez moi metter le smtp en dur(ip)

Source

  • Sub MailEnvoi(Destinataire As String, Sujet As String, Optional Correspondant_CC As String, Optional Correspondant_BCC As String, Optional CorpsDuTexte As String, Optional Attach As Variant)
  • Set objEmail = CreateObject("CDO.Message")
  • 'Set objEmail = CreateObject("cdonts.NewMail")
  • objEmail.From = "XXXX"
  • objEmail.To = Destinataire
  • objEmail.CC = Correspondant_CC
  • objEmail.BCC = Correspondant_BCC
  • objEmail.Subject = Sujet
  • objEmail.TextBody = CorpsDuTexte
  • If Attach <> "" Then objEmail.AddAttachment Attach
  • objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  • 'Name or IP of Remote SMTP Server
  • objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.7.1"
  • '"smtp.radissonSAS.com" 192.168.X.X"
  • 'Server port (typically 25)
  • 'objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  • objEmail.Configuration.Fields.Update
  • objEmail.Send
  • End Sub
Sub MailEnvoi(Destinataire As String, Sujet As String, Optional Correspondant_CC As String, Optional Correspondant_BCC As String, Optional CorpsDuTexte As String, Optional Attach As Variant)
Set objEmail = CreateObject("CDO.Message")
'Set objEmail = CreateObject("cdonts.NewMail")

    objEmail.From = "XXXX"
    objEmail.To = Destinataire
    objEmail.CC = Correspondant_CC
    objEmail.BCC = Correspondant_BCC
    objEmail.Subject = Sujet
    objEmail.TextBody = CorpsDuTexte
        If Attach <> "" Then objEmail.AddAttachment Attach
        
    objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

    'Name or IP of Remote SMTP Server
    objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.7.1"
    '"smtp.radissonSAS.com" 192.168.X.X"

    'Server port (typically 25)
    'objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

    objEmail.Configuration.Fields.Update

    objEmail.Send

End Sub



 Sources de la même categorie

Source avec Zip GESTION PERSONNEL par oudlarbi
Source avec Zip Source avec une capture CALENDRIER EN VBA POUR EXCEL 2010 par nounou94
Source avec Zip Source avec une capture MANIPULER LES FENETRES ENFANT D'EXCEL par bigfish_le vrai
Source avec Zip Source avec une capture COLLECTION ID par Le Pivert
Source avec Zip Source avec une capture VBA MASQUE DE SAISIE NUMÉRIQUE par acive

Commentaires et avis

Commentaire de gloups le 01/08/2003 15:47:52

merci merci merci merci merci merci merci merci merci merci

Commentaire de premium0 le 02/10/2003 17:48:24

Certes, c'est un peu confu. Mais on y arrive ! C'est l'essentiel, merci !

Commentaire de devsurf le 09/12/2003 01:21:24

Je n'arrive pas à utiliser cette source qui pourrait effectivement m'aider.
Aves vous un zip avec les composants necessaires et un exemple d'utilisation ?
Merci

Commentaire de Ulysse3 le 23/04/2005 04:34:04

bon évidament sa ne marchera pas sur mon ordi

Commentaire de Ulysse3 le 23/04/2005 04:37:55

Effectivement sa ne marche pas

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,608 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales