View Single Post
  #3  
Old May 21st 10, 01:07 PM
steve sharpe steve sharpe is offline
Junior Member
 
First recorded activity at Outlookbanter: May 2010
Posts: 6
Default

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

Quote:
Originally Posted by Ken Slovak - [MVP - Outlook] View Post
Call Display() before you add anything to the body. The signature is added
after the item is opened.

If you want to have your addition before any signature then after you call
Display() use code like this:

myItem.Body = "body text" & myItem.Body

--
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
...

I have attached the following code to a button on the quick access bar
in Outlook. It does all I want except that "body text" erases my
default signature. Is there some additional code I could include that
would complete the email with my default signature? The default
signature uses various fonts sizes and colours. Thanks for any help.

Sub inspector()

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.Body = "body text"
myAttachments.Add "C:\Documents and settings\etc
myItem.Display

End Sub




--
steve sharpe
Ads