Adding signature in using VBA

A

Andy.Devine

Hi
I'm using the following code in (excel VB) which works very well
except it deletes my signature.

Anyway of preventing this? or readding the signature back in?

Thanks

Andy

******
'creates email
Dim myOutlook As Object
Dim myMailItem As Object
Dim fName As Object
'Dim sig As Signature
Dim strbody As String
Dim a As String

Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)

With otlNewMail
..Attachments.Add "C:\@order_system\" &
Workbooks("Schedule.xls").Sheets("Import2").Range("b4").Value & ".xls"
..To = Workbooks("Schedule.xls").Sheets("Main2").Range("c9").Value
..Subject = "Please see attached schedules for " &
Sheets("Import2").Range("b4").Value
..body = Workbooks("Schedule.xls").Sheets("Main2").Range("bb1").Value
..Display
End With
 
M

Michael Bauer [MVP - Outlook]

.body = Workbooks("Schedule.xls").Sheets("Main2").Range("bb1").Value
.Display

instead:

..Display
..body = Workbooks("Schedule.xls").Sheets("Main2").Range("bb1").Value & .body

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)


Am 11 Apr 2007 06:22:51 -0700 schrieb (e-mail address removed):
 
S

Sue Mosher [MVP-Outlook]

Call Display first, then **append** to Body.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top