Envoi automatique de planning par outlook (outlook tout court)
7 réponses
mh,
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème:
J'aimerais envoyer automatiquement à deux personnes un planning excel, dès
que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas
trop comment.
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail .To = "" .CC = "; " .Subject = "Modifiaction Planning" .Body = MONTEXTE ..Attachments.Add ActiveWorkbook.FullName End With
olmail.Display End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer directement sans passer par l'interface Outlook (display est mieux tout de même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème: J'aimerais envoyer automatiquement à deux personnes un planning excel, dès que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas trop comment.
Dim ol As New Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Set ol = New Outlook.Application
Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail
.To = "toto@email.fr"
.CC = "tit@google.fr; tata@yahoo.fr"
.Subject = "Modifiaction Planning"
.Body = MONTEXTE
..Attachments.Add ActiveWorkbook.FullName
End With
olmail.Display
End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer
directement sans passer par l'interface Outlook (display est mieux tout de
même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème:
J'aimerais envoyer automatiquement à deux personnes un planning excel, dès
que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas
trop comment.
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail .To = "" .CC = "; " .Subject = "Modifiaction Planning" .Body = MONTEXTE ..Attachments.Add ActiveWorkbook.FullName End With
olmail.Display End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer directement sans passer par l'interface Outlook (display est mieux tout de même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème: J'aimerais envoyer automatiquement à deux personnes un planning excel, dès que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas trop comment.
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail .To = "" .CC = "; " .Subject = "Modifiaction Planning" .Body = MONTEXTE ..Attachments.Add ActiveWorkbook.FullName End With
olmail.Display End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer directement sans passer par l'interface Outlook (display est mieux tout de même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème: J'aimerais envoyer automatiquement à deux personnes un planning excel, dès que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas trop comment.
Pour lire la lettre de mh:
http://www.lalettredemh.com/
Maman-Roule
http://mamanroule.typepad.com/
"Poulpor" <Poulpor@discussions.microsoft.com> a écrit dans le message de
news: 93630B0B-6D0E-42C9-8576-FBD791A7350A@microsoft.com...
Bonjour,
Je crois que tu as des exemples quasi clé en main dans la mine d'or
excelabo.net
ATTENTION : dans le vb editor, outilReference => cocher la référence à
Microsoft Outlook ...sinon, ca ne marchera pas
Dim ol As New Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Set ol = New Outlook.Application
Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail
.To = "toto@email.fr"
.CC = "tit@google.fr; tata@yahoo.fr"
.Subject = "Modifiaction Planning"
.Body = MONTEXTE
..Attachments.Add ActiveWorkbook.FullName
End With
olmail.Display
End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer
directement sans passer par l'interface Outlook (display est mieux tout de
même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème:
J'aimerais envoyer automatiquement à deux personnes un planning excel,
dès
que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas
trop comment.
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
With olmail .To = "" .CC = "; " .Subject = "Modifiaction Planning" .Body = MONTEXTE ..Attachments.Add ActiveWorkbook.FullName End With
olmail.Display End sub
Note : remplacer olmail.Display par olmail.send si on préfere l'envoyer directement sans passer par l'interface Outlook (display est mieux tout de même pour permettre la modification avant envoi)
Poulpor
Poulpor
Bonjour, J'ai besoin de vos lumières pour m'aider à résoudre ce problème: J'aimerais envoyer automatiquement à deux personnes un planning excel, dès que celui-ci est modifié.
je vais tacher de tenter une macro par enregistrement mais je ne vois pas trop comment.
Après test c'est ok mais... mais... je souhaiterais l'envoyer en cci et je n'y arrive pas. ..
J'abuse là ???
mh,
Bonsoir,
Comme dans ton programme mail ! .to -> destinataire .cc -> copie carbone .cci -> copie carbone invisible
J'abuse là ??? Euh ... un peu ? :o)
@+ FxM
mh,
Comme dans ton programme mail ! .cci -> copie carbone invisible
Nan ! ça fonctionne pas ======================================= Sub envoi_auto() ActiveWorkbook.Save MONTEXTE = "Bonjour," & Chr(13) & Chr(13) & "Veuillez recevoir ce planning modifié"
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then End If With olmail .To = "" .CC = "; " .CCi = " .Subject = "[MH]Modification Planning" .Body = MONTEXTE .Attachments.Add ActiveWorkbook.FullName End With
olmail.Display
End Sub ======================================= Il me dit: (excel ma dit donc): Erreur d'execution 438 Propriété ou methode non gerée par cet objet
Pour lire la lettre de mh: http://www.lalettredemh.com/ Maman-Roule http://mamanroule.typepad.com/
Comme dans ton programme mail !
.cci -> copie carbone invisible
Nan ! ça fonctionne pas
======================================= Sub envoi_auto()
ActiveWorkbook.Save
MONTEXTE = "Bonjour," & Chr(13) & Chr(13) & "Veuillez recevoir ce
planning modifié"
Dim ol As New Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Set ol = New Outlook.Application
Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then
End If
With olmail
.To = "tarawzs@yahoo.fr"
.CC = "ava@yahoo.fr; tata@yahoo.fr"
.CCi = "luntrfge@yahoo.fr
.Subject = "[MH]Modification Planning"
.Body = MONTEXTE
.Attachments.Add ActiveWorkbook.FullName
End With
olmail.Display
End Sub
=======================================
Il me dit: (excel ma dit donc):
Erreur d'execution 438
Propriété ou methode non gerée par cet objet
Comme dans ton programme mail ! .cci -> copie carbone invisible
Nan ! ça fonctionne pas ======================================= Sub envoi_auto() ActiveWorkbook.Save MONTEXTE = "Bonjour," & Chr(13) & Chr(13) & "Veuillez recevoir ce planning modifié"
Dim ol As New Outlook.Application Dim olmail As MailItem Dim CurrFile As String
Set ol = New Outlook.Application Set olmail = ol.CreateItem(olMailItem)
If STATUT = "REFUSE" Then End If With olmail .To = "" .CC = "; " .CCi = " .Subject = "[MH]Modification Planning" .Body = MONTEXTE .Attachments.Add ActiveWorkbook.FullName End With
olmail.Display
End Sub ======================================= Il me dit: (excel ma dit donc): Erreur d'execution 438 Propriété ou methode non gerée par cet objet