khaledocom
New Member
- Joined
- Jan 1, 2010
- Messages
- 29
The bellow code shows Excel VBA code to make signature for outlook 2007 outgoing messages.
It works properly but doesn't show the picture in signature (Pic is not appearing). Can you help with this regarding.
<table width="560" border="0" cellpadding="0" cellspacing="0"><col style="width: 42pt;" width="56" span="10"> <tbody><tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt; width: 420pt;" width="560" height="21">The pic (photo) in my signature doesn't appear when I use signature code</td> </tr> <tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt;" height="21">It show only red X on top.
</td> </tr> </tbody></table>
Code:
Function GetBoiler(ByVal sFile As String) As String
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()
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")
Set OutMail = OutApp.CreateItem(0)
strbody = "Go for test mode of Qtel billing and recovery"
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\Khaledo.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = "khaledocom@yahoo.com"
.CC = ""
.BCC = ""
.Subject = "Test Mode"
.HTMLBody = strbody & "<br><br>" & Signature
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I'm very thankful for your help and support.
It works properly but doesn't show the picture in signature (Pic is not appearing). Can you help with this regarding.
<table width="560" border="0" cellpadding="0" cellspacing="0"><col style="width: 42pt;" width="56" span="10"> <tbody><tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt; width: 420pt;" width="560" height="21">The pic (photo) in my signature doesn't appear when I use signature code</td> </tr> <tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt;" height="21">It show only red X on top.
</td> </tr> </tbody></table>
Code:
Function GetBoiler(ByVal sFile As String) As String
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()
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")
Set OutMail = OutApp.CreateItem(0)
strbody = "Go for test mode of Qtel billing and recovery"
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\Khaledo.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = "khaledocom@yahoo.com"
.CC = ""
.BCC = ""
.Subject = "Test Mode"
.HTMLBody = strbody & "<br><br>" & Signature
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I'm very thankful for your help and support.