Signature HTML dans Code VBA

sokour

XLDnaute Occasionnel
Bonjour,

Je voulais savoir si il etais possible d'incorporer une signature HTML dans un code VBA.
J'ai fait une macro qui envoie un mail depuis Excel a Lotus notes, par contre je n'arrives pas a integrer ma signature HTML.

Avez vous un code pour incorporer cela? une solution?

MErci
 

mromain

XLDnaute Barbatruc
Re : Signature HTML dans Code VBA

bonjour sokour,

si il s'agit d'une signature avec que du texte, ne serait-il pas possible de le rajouter à la fin du mail par macro ?
dans tous les cas, peux-tu s'il te plait poster ton code (envoyer un mail via Notes par Excel), ça m'intéresserai d'avoir un exemple.

merci

a+
 

sokour

XLDnaute Occasionnel
Re : Signature HTML dans Code VBA

Non c'est une signature HTML avec une image, je voudrais qu'il reprennent ma signature dans lotus.
voici le code

Set oSess = CreateObject("Notes.NotesSession")
Set oDB = oSess.GETDATABASE("", "")
Call oDB.OPENMAIL
flag = True
If Not (oDB.IsOpen) Then flag = oDB.Open("", "")

If Not flag Then
MsgBox "Can't open mail file: " & oDB.SERVER & " " & oDB.FILEPATH
GoTo exit_SendAttachment
End If
On Error GoTo err_handler


Set oDoc = oDB.CREATEDOCUMENT
Set oItem = oDoc.CREATERICHTEXTITEM("BODY")
oDoc.Form = "Memo"
oDoc.Subject = ...
oDoc.SendTo = ...
oDoc.CopyTo = ...
oDoc.body = "Please find enclosed the "
oDoc.postdate = Date


Call oItem.EmbedObject(1454, "", "....")
oDoc.visable = True

oDoc.SEND False
exit_SendAttachment:
On Error Resume Next
Set oSess = Nothing
Set oDB = Nothing
Set oDoc = Nothing
Set oItem = Nothing

Exit Sub
err_handler:
If Err.Number = 7225 Then
MsgBox "File doesn't exist"
Else
MsgBox Err.Number & " " & Err.Description
End If
On Error GoTo exit_SendAttachment



End Sub
 

mromain

XLDnaute Barbatruc
Re : Signature HTML dans Code VBA

Non c'est une signature HTML avec une image, je voudrais qu'il reprennent ma signature dans lotus.
voici le code

Set oSess = CreateObject("Notes.NotesSession")
Set oDB = oSess.GETDATABASE("", "")
Call oDB.OPENMAIL
flag = True
If Not (oDB.IsOpen) Then flag = oDB.Open("", "")

If Not flag Then
MsgBox "Can't open mail file: " & oDB.SERVER & " " & oDB.FILEPATH
GoTo exit_SendAttachment
End If
On Error GoTo err_handler


Set oDoc = oDB.CREATEDOCUMENT
Set oItem = oDoc.CREATERICHTEXTITEM("BODY")
oDoc.Form = "Memo"
oDoc.Subject = ...
oDoc.SendTo = ...
oDoc.CopyTo = ...
oDoc.body = "Please find enclosed the "
oDoc.postdate = Date


Call oItem.EmbedObject(1454, "", "....")
oDoc.visable = True

oDoc.SEND False
exit_SendAttachment:
On Error Resume Next
Set oSess = Nothing
Set oDB = Nothing
Set oDoc = Nothing
Set oItem = Nothing

Exit Sub
err_handler:
If Err.Number = 7225 Then
MsgBox "File doesn't exist"
Else
MsgBox Err.Number & " " & Err.Description
End If
On Error GoTo exit_SendAttachment



End Sub


merci pour le code et bonne chance pour ton problème ;)


a+
 

Discussions similaires

Statistiques des forums

Discussions
312 332
Messages
2 087 362
Membres
103 528
dernier inscrit
maro