Dear Friends,
can anyone help me with a code line that automatically inserts my signature when i m sending the mail.
Note: the mail is generated with the help of macro only so i would like to generate the signature with the help of code only.
Dear Friends,
can anyone help me with a code line that automatically inserts my signature when i m sending the mail.
Note: the mail is generated with the help of macro only so i would like to generate the signature with the help of code only.
hi,
try this, it works!
http://www.excelforum.com/excel-prog...-vba-code.html
Regards, John55
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
...enjoy -funny parrots-
Hi yeshwant_sur
Post your code...I'll look at it.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Function GetBoiler(ByVal sFile As String) As String
'**** Kusleika
Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function
Sub test1()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String
' Set OutApp = CreateObject("Outlook.Application")
' Set OutMail = OutApp.CreateItem(0)
SigString = Environ("appdata") & _
"\Microsoft\Signatures\Mysig.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
End Sub
Hi yeshwant_sur
Please include ALL of the Email Code AND wrap your code in Code Tags (See Rule #3).
Also do a search on the word Signatures to find the correct Path of the Signatures Folder...let me know that Path and the Name of YOUR Signature File.
Last edited by jaslake; 06-14-2012 at 10:19 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks