par Maxime Choucroun » 23 Juin 2010 à 14:07
J'ai trouvé cette reponse qui est une fusion de codes de ma part. Je ne sais plus ou j'ai trouvé cela, mais je n'en suis pas l'auteur...
En tout cas, J'espère que cela servira à d'autres...
Sub Click(Source As Button)
Dim uiworkspace As New NotesUIWorkspace
Dim uidoc As NotesuiDocument
Dim adoc As NotesDocument
Set uidoc = uiworkspace.CurrentDocument
Set adoc = uidoc.Document
Set rtitem = adoc.GetFirstItem("Body")
If rtitem Is Nothing Then Error 1000, "Unable to get a handle to Body item."
Set rtnav = rtitem.CreateNavigator
oflg = rtnav.FindFirstElement(RTELEM_TYPE_FILEATTACHMENT)
Do While oflg
If oflg Then Set rtobj = rtnav.GetElement
If rtobj.Type = EMBED_ATTACHMENT Then
aname = rtobj.Source
REM detachFile(doc As NotesDocument, rtname As String, fname As String, fpath As String) As Boolean
' retflg = detachfile(adoc, "Body", aname, apathcur)
REM we're removing the attachment and replacing with a link
msgbox( rtobj.Source )
End If
oflg = rtnav.FindNextElement(RTELEM_TYPE_FILEATTACHMENT)
Loop
End Sub