Below code works, except that instead of a Signature that I have designated as default in Outlook to be added to all my emails, this code picks another signature.
- How do I fix it for it to pick a Signature that I have designated as default in Outlook to be added to all my emails?
Playing with numbers in this part of the code does not do the trick: "OpenAsTextStream(1, -2)"
And then I append & S at the end of "EmailItem.HTMLBody = "
- How do I fix it for it to pick a Signature that I have designated as default in Outlook to be added to all my emails?
Playing with numbers in this part of the code does not do the trick: "OpenAsTextStream(1, -2)"
VBA Code:
Dim OutApp As Object, OutMail As Object, LogFile As String
Dim cell As Range, S As String, WMBody As String, lFile As Long
S = Environ("appdata") & "\Microsoft\Signatures\"
If Dir(S, vbDirectory) <> vbNullString Then S = S & Dir$(S & "*.htm") Else S = ""
S = CreateObject("Scripting.FileSystemObject").GetFile(S).OpenAsTextStream(1, -2).ReadAll
And then I append & S at the end of "EmailItem.HTMLBody = "