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

  FORUM HardWare.fr
  Windows & Software
  Logiciels

  Display n'affiche pas (macro excel envoi mail via outlook)

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Display n'affiche pas (macro excel envoi mail via outlook)

n°2957726
Crochette
Posté le 18-08-2010 à 16:16:13  profilanswer
 

Bonjour,  
 
J'ai trouvé une macro excel qui envoie des mails avec images via outlook, elle fonctionne très bien (merci à l'auteur: Ron de Bruin), cependant je souhaite voir le mail avant de l'envoyer. J'ai essayé de changer .Send par .Display mais cela ne fonctionne pas et je ne trouve pas de solution.  
Quelqu'un a-t-il une explication?  
 

Code :
  1. Sub Send_Selection_Or_ActiveSheet_with_MailEnvelope()
  2.     Dim Sendrng As Range
  3.     On Error GoTo StopMacro
  4.     With Application
  5.         .ScreenUpdating = False
  6.         .EnableEvents = False
  7.     End With
  8.     'Note: if the selection is one cell it will send the whole worksheet
  9.     Set Sendrng = Selection
  10.     'Create the mail and send it
  11.     With Sendrng
  12.         ActiveWorkbook.EnvelopeVisible = True
  13.         With .Parent.MailEnvelope
  14.             ' Set the optional introduction field thats adds
  15.             ' some header text to the email body.
  16.             .Introduction = "This is a test mail."
  17.             ' In the "With .Item" part you can add more options
  18.             ' See the tips on this Outlook example page.
  19.             ' http://www.rondebruin.nl/mail/tips2.htm
  20.             With .Item
  21.                 .Send
  22.                 .To = ""
  23.                 .Subject = "My subject"
  24.             End With
  25.         End With
  26.     End With
  27. StopMacro:
  28.     With Application
  29.         .ScreenUpdating = True
  30.         .EnableEvents = True
  31.     End With
  32.     ActiveWorkbook.EnvelopeVisible = False
  33. End Sub


 
Merci de votre aide.
 
Crochette. :??:

mood
Publicité
Posté le 18-08-2010 à 16:16:13  profilanswer
 

n°2957727
Crochette
Posté le 18-08-2010 à 17:44:27  profilanswer
 

La solution était de supprimer la ligne 41, maintenant ça marche nickel.
 
Merci.

n°2957728
DraX
♪ | Membre raccourci | 12th
Posté le 18-08-2010 à 17:56:00  profilanswer
 

Ce sujet a été déplacé de la catégorie Hardware vers la categorie Windows & Software par DraCuLaX


---------------
| Un malentendu du cul | boum boum ! | La roulette
n°2957800
Crochette
Posté le 19-08-2010 à 13:36:26  profilanswer
 

DraX a écrit :

Ce sujet a été déplacé de la catégorie Hardware vers la categorie Windows & Software par DraCuLaX


 
C'est moi-même qui ai écrit la solution à mon problème sur ce poste, je sais bien qu'il est résolu! Alors pourquoi bloquer mon sujet d'aujourd'hui, je suis toujours sur le même code mais ma question est totalement différente et n'a à mon sens rien à faire ici!


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Windows & Software
  Logiciels

  Display n'affiche pas (macro excel envoi mail via outlook)

 

Sujets relatifs
Recupérer dossiers Outlook après formatageoutlook express vers outlook 2010
[Excel] Generer une base de donnée[Excel] Copier le contenu d'une cellule sans caractère d'échappement?
Excel : fonction recherchev +siRedirection mails exchange
Outlook : liste d'adresses depuis MySQLCREER ET GERER UN PLANNING AVEC EXCEL
Plantage Outlook 2007 
Plus de sujets relatifs à : Display n'affiche pas (macro excel envoi mail via outlook)


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