![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
email signature disappears | Savannah | Outlook - General Queries | 3 | April 8th 07 03:42 AM |
Email Signature Resets | jlchianese | Outlook - Installation | 3 | August 12th 06 02:10 PM |
Word Signature File Causing ActiveX Error When Creating New Messag | stevenh | Outlook - Installation | 0 | March 29th 06 02:53 PM |
Error Signature Outllok.exe | hvac2805 | Outlook - General Queries | 0 | March 27th 06 12:53 AM |
two signature files on the same email | Timo | Outlook - Installation | 1 | March 25th 06 08:20 AM |