Hi guys, I have another one I can't seem to achieve, adding a signature to an email body, the following is where I am at, the getboiler I found on the net and email from my database, I use emails a lot from access both attaching pdfs and direct data to mailbody, any idea's on signatures as I use about 8 different signatures ?? ie orders@ enquiries@ dave@ etc Note: Signatures are definitely located in the "MySig" path
Modules / Public Subs
Public Function GetBoiler (ByVal, sFile As String) as String
Dim fso as Object, ts as Objecto
Set fso = CreateObject("ScriptingFileSytsemObject")
Set ts = fso.GetFile(sfile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function
COMMAND BUTTON
Dim MyApp as Outlook.Application
Dim MyItem as Outlook.MailItem
Dim MySig, Signature, MyBody as String
MySig = Environ ("AppData") & "\Microsoft\Signatures\orders@.htm"
If Dir(MySig <> "" Then
Signature = GetBoiler (MySig)
Else
Signature = ""
End IF
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(olMailItem)
MyBody = MyBody & "Test Mail From Me"
With MyItem
.To = "dave@home.com"
.Subject = "TEST MAIL FROM ME"
.body = MyBody & Chr(10) & Chr(10) & _
Signature
.Display
End With
This generate the mail but doesn't add signature!!!!!!! thanks again guys for all of your help on the report, I hope I correctly gave you comments and stars