View Single Post
  #4  
Old May 21st 10, 05:25 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default macro to include email signature

I'm not sure. Let's see what happens first if you comment out the line
myItem.Body = "body text" & myItem.Body. Do you get the signature then? If
so and the body format is HTML, then see if it helps to use this line
instead:

myItem.HTMLBody = "body text" & myItem.HTMLBody

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"steve sharpe" wrote in message
...

Hi Ken
Thankyou for youir reply. What have I done wrong? I think I have
altered my code as you suggested but it does not make any difference.
Here's what I wrote... Would you be kind enough to point out my
mistake?

Sub InsertMySig()
Dim myOlApp As New Outlook.Application
Dim myItem As Object
Dim myAttachments As Outlook.Attachments
Set myItem = myOlApp.ActiveInspector.currentitem
Set myAttachments = myItem.Attachments
myItem.Subject = "Status Report"
myItem.Display
myItem.Body = "body text" & myItem.Body
myAttachments.Add "C:\Documents and settings\etc"
End Sub

I look forward to hearing from you.
Best wishes

Steve


Ads