Bonjour le forum,
Je tente d'insérer la signature par défaut de ma messagerie OUTLOOK 365 via une macro. Pour cela, j'ai utilisé le code de @thev. Cela fonctionne à merveille pour la partie texte mais impossible d'insérer l'image de la signature qui va avec.
Voici la fonction en question :
Function Signature(nom_signature As String) As String
Dim FSO As Object, TextStream As Object
Dim nom_fichier As String
Signature = Empty
On Error Resume Next
Set FSO = CreateObject("Scripting.FileSystemObject")
nom_fichier = Environ("APPDATA") & "\Microsoft\Signatures\" & nom_signature & ".htm"
Set TextStream = FSO.OpenTextFile(nom_fichier)
If Err.Num = 0 Then
Signature = TextStream.ReadAll
'remplacement adresse relative images par adresse absolue
Signature = Replace(Signature, nom_signature & "_fichiers/", Environ("APPDATA") & "\Microsoft\Signatures\" & nom_signature & "_fichiers/")
End If
End Function
Est-ce que quelqu'un a une solution à me proposer pour palier à ce soucis ?
Un grand merci d'avance.