Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Email - Signature with no Picture

Hi Can anyone help with this.
I have managed to programmatically attach a file to email with Signature
(Compliments to Ron de Bruin) but the problem I now have is, it wont attach
the Picture along with the Signature, just the outline. Also, is there a way
of changing the text in the email from the System default to something else?
Running Window 7 and Microsoft Outlook
Help greatly appreciated
Regards
John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email - Signature with no Picture

Hi John

Never try it with a picture
But it is possible to add htm that load a picture into the mail

You can change the text also with html
The best thing that you can do is to create a block of html with your Signature
and add it to the htmlbody



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JohnUK" wrote in message ...
Hi Can anyone help with this.
I have managed to programmatically attach a file to email with Signature
(Compliments to Ron de Bruin) but the problem I now have is, it wont attach
the Picture along with the Signature, just the outline. Also, is there a way
of changing the text in the email from the System default to something else?
Running Window 7 and Microsoft Outlook
Help greatly appreciated
Regards
John

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Email - Signature with no Picture

Hi Ron, Thanks for your reply.
The original has a picture within the Signature (html) but for some reason
it doesnt want to show (Apart from the outline where it should be)
With regards the Text (Font) do you mean add a block so that the user can
overwrite with whatever so that the text stays in the desired font?
John

This is your original code (without the comments)
Sub Mail_Outlook_With_Signature_Html()
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)
SigString = "C:\Users\" & Environ("username") & _
"\AppData\Roaming\Microsoft\Signatures\Test email.htm"
If Dir(SigString) < "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.HTMLBody = strbody & "<br<br" & Signature
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
"Ron de Bruin" wrote:

Hi John

Never try it with a picture
But it is possible to add htm that load a picture into the mail

You can change the text also with html
The best thing that you can do is to create a block of html with your Signature
and add it to the htmlbody



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JohnUK" wrote in message ...
Hi Can anyone help with this.
I have managed to programmatically attach a file to email with Signature
(Compliments to Ron de Bruin) but the problem I now have is, it wont attach
the Picture along with the Signature, just the outline. Also, is there a way
of changing the text in the email from the System default to something else?
Running Window 7 and Microsoft Outlook
Help greatly appreciated
Regards
John

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email - Signature with no Picture

You must add html that load the picture like this (not a good picture but you can see how it works)

strbody = "<table<td valign=""top""<img src=""http://www.rondebruin.nl/images/ron.png"" alt=""ron logo"" " & _
"width=""160"" height=""120"" hspace=""10"" vspace=""10"" align=""left"" border=""0"" /</td" & _
"<tr<br<br<td" & Format(Date, "dd-mmm-yyyy") & "</td</tr</table"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JohnUK" wrote in message ...
Hi Ron, Thanks for your reply.
The original has a picture within the Signature (html) but for some reason
it doesnt want to show (Apart from the outline where it should be)
With regards the Text (Font) do you mean add a block so that the user can
overwrite with whatever so that the text stays in the desired font?
John

This is your original code (without the comments)
Sub Mail_Outlook_With_Signature_Html()
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)
SigString = "C:\Users\" & Environ("username") & _
"\AppData\Roaming\Microsoft\Signatures\Test email.htm"
If Dir(SigString) < "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.HTMLBody = strbody & "<br<br" & Signature
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
"Ron de Bruin" wrote:

Hi John

Never try it with a picture
But it is possible to add htm that load a picture into the mail

You can change the text also with html
The best thing that you can do is to create a block of html with your Signature
and add it to the htmlbody



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JohnUK" wrote in message ...
Hi Can anyone help with this.
I have managed to programmatically attach a file to email with Signature
(Compliments to Ron de Bruin) but the problem I now have is, it wont attach
the Picture along with the Signature, just the outline. Also, is there a way
of changing the text in the email from the System default to something else?
Running Window 7 and Microsoft Outlook
Help greatly appreciated
Regards
John

.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert email signature from EXCEL VBA Eric_G Excel Programming 5 November 13th 09 08:59 PM
Email to include a saved signature from outlook. Paul Lambson Excel Programming 1 November 2nd 09 09:22 PM
Email signature and sending an excel 2007 spreadsheet edith Excel Discussion (Misc queries) 0 April 24th 08 10:47 PM
Email Body Text & Signature Darrell Lankford Excel Programming 1 April 7th 06 05:50 PM
Digital Signature Email NicB.[_2_] Excel Programming 0 March 3rd 06 03:28 PM


All times are GMT +1. The time now is 06:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"