Envoi de mail avec plusieurs piece jointe

cs_julian Messages postés 21 Date d'inscription lundi 17 décembre 2001 Statut Membre Dernière intervention 6 juin 2002 - 18 janv. 2002 à 09:55
cristiandan Messages postés 52 Date d'inscription lundi 26 novembre 2001 Statut Membre Dernière intervention 4 novembre 2005 - 17 févr. 2002 à 17:56
Bon cé tout simple.
J'ai un code ki envoie un mail avec une piéce jointe attachée mais j'aimerai pouvoir en envoyer plusieurs.
mon code:

Private Sub Send_Click()

Dim LocVarJ, NbPieceJointe As Integer
Dim tsuj, tfig
Dim Msg, Style, Titre, reponse

MAPISess.SignOn
With MAPIMess
.MsgIndex = -1
.RecipDisplayName = txtDest
.RecipAddress = txtTo
.MsgSubject = txtsubject
.MsgNoteText = txtNoteText
.AttachmentPathName = txtJoinFi
.SessionID = MAPISess.SessionID
.Send
End With
MAPISess.SignOff
End Sub

' Boutton pour joindre un fichier.

Private Sub cmdjoin_Click()

On Error Resume Next
CMDialog2.DialogTitle = "Fichier joint"
CMDialog2.FileName = ""
CMDialog2.Filter = "Fichiers Immo (*.anc2)|*.anc2"
CMDialog2.ShowOpen
txtJoinFi = CMDialog2.FileName
txtNomFi = CMDialog2.FileTitle
End Sub

Si qq'un cé comment faire pour envoyer plusieurs piece jointe, alors cé super.
MERCI BCP.

1 réponse

cristiandan Messages postés 52 Date d'inscription lundi 26 novembre 2001 Statut Membre Dernière intervention 4 novembre 2005
17 févr. 2002 à 17:56
Je sais qu'il faut gérer la propriété .AttachmentIndex. En fait il faut l'incrémenter à chaque nouvelle pièce jointe. Le hic c'est que ca me génère une erreur si j'attache plusieures PJ.
Personne d'autre n'a une solution valable?
0
Rejoignez-nous