Macro to add signature - error - Wingdings!

M

Marlene.Sawhney

Hello Everyone,

I am using the Ron de Bruin "Insert Outlook Signature in mail" code.
However, when the signature is produced in outlook is looks like
this:


ÐÏ à¡± á


It looks like the wingding font. Does anyone have a clue as to why
this is happening? I'm sure there is an easy explanation but I'm just
not getting...any help would be great!! THANK YOU!


Here is the code...


Function GetBoiler(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)
GetBoiler = ts.readall
ts.Close
End Function


Sub Mail_Outlook_With_Signature_Plain()
' Don't forget to copy the function GetBoiler in the module.
' Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


strbody = "Hi there"


SigString = "C:\Documents and Settings\msawhney\Application Data
\Microsoft\Signatures\John.doc"


If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = "no"
End If


On Error Resume Next
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody & vbNewLine & vbNewLine & Signature
'You can add files also like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Display
End With
On Error GoTo 0


Set OutMail = Nothing
Set OutApp = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top