Naõ tenho certeza se este código ainda funciona, mas vou deixar aqui para registro antes de apagar dos meus backups.
;-)
Option Explicit
Dim assinatura As Variant
Public Function pega_assinatura(ByVal sFile As String) As String
'Dick Kusleika
Dim FSO As Object
Dim ts As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
Set ts = FSO.GetFile(sFile).OpenAsTextStream(1, -2)
pega_assinatura = ts.ReadAll
ts.Close
End Function
Sub Cria_mensagem_HTML()
'Creates a new e-mail item and modifies its properties.
Dim olApp As Outlook.Application
Dim objMail As MailItem
Set olApp = Outlook.Application
'Create mail item
Set objMail = olApp.CreateItem(olMailItem)
assinatura = pega_assinatura("C:\Documents and Settings\" & Environ("username") & "\AppData\Roaming\Microsoft\Assinaturas\Paulo.htm")
With objMail
'Set body format to HTML
'a tag <br/> quebra linha
'a tag <strong></strong> formata o texto para negrito
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><H2>The body of this message will appear in HTML.</H2><BODY>Type the " & _
"<strong>message</strong><br/>Nova Linha</BODY><br/></HTML>" & assinatura
.Display
End With
End Sub
Nenhum comentário:
Postar um comentário