Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1396 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  [VBA] probleme de pièce jointe outlook

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[VBA] probleme de pièce jointe outlook

n°1657154
darkspoilt
Posté le 12-12-2007 à 14:45:39  profilanswer
 

Bonjour je souhaite envoyé un email écris en texte enrichi
J'aime placer ma pièce jointe dans un endroit précis du texte
et a l'envoie ma pièce jointe se place a la fin du texte  
Voici le code que j'ai généré
SI quelqu'un voit l'erreur  
je lui en serait très reconnaissant
Merci d'avance
 

Code :
  1. Dim MonOutlook As Outlook.MailItem
  2.   Dim MesAttachements As Outlook.Attachments
  3.   Dim MaOutLookApplication As Object
  4.   Set MaOutLookApplication = CreateObject("Outlook.Application" )
  5.   Set MonOutlookMessage = MaOutLookApplication.CreateItem(olMailItem)
  6.   Set MesAttachements = MonOutlookMessage.Attachments
  7.   MonOutlookMessage.to = adresse
  8.   MonOutlookMessage.cc = adressecc
  9.   MonOutlookMessage.bcc = ""
  10.   MonOutlookMessage.Subject = "Alertes E-transaction pour l'établissement" & " " & Banq & " " & "(" & " " & Count & " " & "alertes" & " )"
  11. MonOutlookMessage.BodyFormat = olFormatRichText
  12. MonOutlookMessage.Attachments.Add "D:\E-transaction\EnvoiCR.xls", , 1
  13. MonOutlookMessage.body = b4 & vbCrLf & _
  14.                          b5 & vbCrLf & _
  15.                          b6 & vbCrLf & _
  16.                          b7 & vbCrLf & _
  17.                          b8 & vbCrLf & _
  18.                          b9 & vbCrLf & _
  19.                          b10 & vbCrLf & _
  20.                          b11 & vbCrLf & _
  21.                          b12 & vbCrLf & _
  22.                          b13 & vbCrLf & _
  23.                          b14 & vbCrLf & _
  24.                          b15 & vbCrLf & _
  25.                          b16 & vbCrLf & _
  26.                          b17 & vbCrLf & _
  27.                          b18 & vbCrLf & _
  28.                          b19 & vbCrLf & _
  29.                          b20 & vbCrLf & _
  30.                          b21 & vbCrLf & _
  31.                          b22 & vbCrLf
  32. MonOutlookMessage.Attachments.Add "D:\E-transaction\EnvoiCR.xls", , 1
  33.   'affiche 1
  34.   Debug.Print MonOutlookMessage.Attachments(1).Position
  35.   MonOutlookMessage.Send
  36.   Set MonOutlookMessage = Nothing


Message édité par darkspoilt le 12-12-2007 à 14:48:37
mood
Publicité
Posté le 12-12-2007 à 14:45:39  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  [VBA] probleme de pièce jointe outlook

 

Sujets relatifs
[Perl] Problème de syntaxeprobleme de droit pour acceder a une page avec site nuked clan
[Resolu] Probleme de hauteur de tableauprobleme java bean
probleme sur formulaireprobleme de quotes !
[Javascript] Problème entre deux fonctionsProbléme Vb error '429'
VBA 2007 et INET: serveur OLE introuvable... Au secours ![G TRouvé] A locker merci modo
Plus de sujets relatifs à : [VBA] probleme de pièce jointe outlook


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR