Hello,
I would like to copy/paste a tasks selection in a mail like a excel range copy/paste.
The ActiveSelection in the outlook coding part isn't known as the the selection of MSProject coding part and I don't know how I could do to success it.
thank's for your answers.
-------------------------------------------------------------
Public Sub filtreModifFerman()
Dim rng As Selection
SelectSheet
EditCopy
Set rng = ActiveSelection
Call Envoyer_Mail_Outlook
End Sub
----------------------------------------------------
Sub Envoyer_Mail_Outlook()
Dim ObjOutlook As New Outlook.Application
Dim oBjMail
Dim Nom_Fichier As String
Dim rng As Selection
Set ObjOutlook = New Outlook.Application
Set oBjMail = ObjOutlook.CreateItem(olMailItem)
With oBjMail
.To = "" ' le destinataire
.Subject = "Nouvelle demande d'affectation concernant le projet: " & ActiveProject.ProjectSummaryTask.name ' l'objet du mail
.Body = ActiveSelection
.Attachments.Add ActiveProject.FullName
.Display ' Ici on peut supprimer pour l'envoyer sans vérification
' .Send
End With
' ObjOutlook.Quit
Set oBjMail = Nothing
Set ObjOutlook = Nothing
End Sub