Outlook - problem with dissappearing signature

AndyD

Active Member
Joined
Nov 14, 2002
Messages
449
Hi
I'm using the following code in (excel VB) which works very well
except it deletes my signature.

The reason for this is that the signature is there when the email is created but its replaces it with text when it gets to the line:

.body =

Any way of preventing this? or re-adding 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
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,225,322
Messages
6,184,275
Members
453,225
Latest member
adelphiaUK

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top