![]() |
Error with signature in email - wingdings!
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!! 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 = " .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 |
Error with signature in email - wingdings!
Your GetBoiler function expects a plain text file... based on the extension
of the file you are showing (John.doc) you are likely passing it a Word document ... of course it could be a text file with any extension, but likely that is your problem. BZ wrote in message oups.com... 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!! 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 = " .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 |
Error with signature in email - wingdings!
On Mar 23, 2:04 pm, "BZ" wrote:
Your GetBoiler function expects a plain text file... based on the extension of the file you are showing (John.doc) you are likely passing it a Word document ... of course it could be a text file with any extension, but likely that is your problem. BZ wrote in message oups.com... 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!! 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 = " .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 Thank you! I changed it to txt...which worked, but it didn't keep the bold/italics that I wanted. Is there a way to do that? Thank you! |
All times are GMT +1. The time now is 09:03 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com