bonjour
je n'ai pas trouver de solution sur le forum  (je ne suis pas fort en vba).
comment peut on modifier ce code pour y joindre une piece jointe situé sur le bureau ?
merci de votre aide !
cordialement
Sub SendNotesMail()
On Error Resume Next
    Dim Maildb As Object 'The mail database
    Dim UserName As String 'The current users notes name
    Dim MailDbName As String 'THe current users notes mail database name
    Dim MailDoc As Object 'The mail document itself
    Dim AttachME As Object 'The attachment richtextfile object
    Dim Session As Object 'The notes session
    Dim EmbedObj As Object 'The embedded object (Attachment)
    
    Set Session = CreateObject("Notes.NotesSession")
    UserName = Session.UserName
    MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
    'Open the mail database in notes
    Set Maildb = Session.GetDatabase("", MailDbName)
     If Maildb.IsOpen = True Then
          'Already open for mail
     Else
      
     Maildb.OPENMAIL
            
     End If
    'Set up the new mail document
    Set MailDoc = Maildb.CreateDocument
    MailDoc.Form = "Memo"
    MailDoc.Subject = "ssdfsf ......"
    MailDoc.body = "message....."
    MailDoc.SAVEMESSAGEONSEND = saveit
    
    
    'Send the document
    MailDoc.PostedDate = Now()
    MailDoc.Send 0, "
toto@gdfg.com"
    'Clean Up
    Set Maildb = Nothing
    Set MailDoc = Nothing
    Set AttachME = Nothing
    Set Session = Nothing
    Set EmbedObj = Nothing
End Sub