Amigos,
Tenho o seguinte códio que envia email e anexa arquivo porém não carrega assinatura automaticamente. Alguém poderia me ajudar?
Obrigada desde já!!!
Dim oSess As Object
Dim oDB As Object
Dim oDoc As Object
Dim oItem As Object
Dim direct As Object
Dim Var As Variant
Dim flag As Boolean
Dim CtryCd, CtryName, textBody, textBodyF, dSubject As String
Dim recep(20), recepcc(20), recepbcc(20) As Variant
Dim dStyle As Object
Dim nWorks, edDoc, cDb As Object
'CREATE NOTES SESSION OBJECT
Set oSess = CreateObject("Notes.NotesSession")
'INITIALIZE DATABASE
Set oDB = oSess.GETDATABASE("", "")
'OPEN THE MAIL DATABASE
Call oDB.OPENMAIL
flag = True
If Not (oDB.IsOpen) Then
flag = oDB.Open("", "")
End If
If Not flag Then
MsgBox "Can't open mail file: " & oDB.SERVER & " " & oDB.FilePath
End If
'CREATE THE NEW DOCUMENT
Set oDoc = oDB.CREATEDOCUMENT
'APPEND SUBJECT
Call oDoc.AppendItemValue("Subject", dSubject)
'SET DOCUMENT FORMAT TO MEMO
Call oDoc.AppendItemValue("Form", "Memo")
'APPEND RECIPIENT
Call oDoc.AppendItemValue("SendTo", recep)
Call oDoc.AppendItemValue("Copyto", recepcc)
Call oDoc.AppendItemValue("BlindCopyTo", recepbcc)
'CREATE MEMO BODY
Set oItem = oDoc.CREATERICHTEXTITEM("Body")
Set dStyle = oSess.CreateRichTextStyle
'Call edDoc.Save
'APPEND FIRST LINE OF TEXT...UNFORMATTED
oItem.AppendText textBody & Chr(13) & Chr(13)
'Apply formattation and append text of the body
dStyle.Bold = True
dStyle.notescolor = 4
oItem.AppendStyle dStyle
oItem.AppendText textBodyF & Chr(13) & Chr(13)
dStyle.Italic = False
dStyle.Bold = False
dStyle.notescolor = 0
oItem.AppendStyle dStyle
oItem.AppendText textBodyFooter & Chr(13) & Chr(13)
'Attaching file
Call oItem.EmbedObject(1454, "", CtryFilePath)
oDoc.visable = True
'SEND THE EMAIL
oDoc.postdate = Date
oDoc.SaveMessageOnSend = True
Call oDoc.Send(False)
'CLEAN UP
Set dStyle = Nothing
Set oItem = Nothing
Set oDoc = Nothing
Set oDB = Nothing
Set oSess = Nothing
Postado : 27/09/2012 2:38 pm