Excel envois Fichier PDF piece jointe Outlook

Résolu/Fermé
bidbid21 Messages postés 236 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 16 novembre 2020 - 20 mai 2010 à 12:14
bidbid21 Messages postés 236 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 16 novembre 2020 - 21 mai 2010 à 09:49
Bonjour,
Je voudrais envoyer un fichier PDF qui à été générer par une macro excel par outlook.
J'ai essayer cela:
Dim ol As New Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Set ol = New Outlook.Application
Set olmail = ol.CreateItem(olMailItem)
With olmail
.Attachments.Add "C:\DOCUME~1\gbidault\LOCALS~1\Temp\ComOutils.pdf"
End With
Mais ça ne fonctionne pas. il ne reconnais pas le Outlook. Application
J'utillise Office 2007.
Merci
Cordiallement Guillaume

A voir également:

2 réponses

pijaku Messages postés 12263 Date d'inscription jeudi 15 mai 2008 Statut Modérateur Dernière intervention 4 janvier 2024 2 743
20 mai 2010 à 14:05
Bonjour,
Avant de lancer cette macro, Dans l'éditeur VBA: Faire Outils / Reference et Cocher "Microsoft Outlook Library".
0
bidbid21 Messages postés 236 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 16 novembre 2020 44
21 mai 2010 à 09:49
Merci Pour ta reponse sa fonctionne à merveille
0