• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Email merge with signature and pictures

Costas

Member
Hi Chandoo,

I found this code on another forum on how to add a signature to an email merge.

Code:
Dim StrSignature AsString
StrSignature = GetSignature(sPath)
.HTMLbody = strbody & vbNewLine & vbNewLine & StrSignature

and the function is

Code:
Function GetSignature(fPath AsString)AsString
Dim fso AsObjectDim TSet AsObject
Set fso = CreateObject("Scripting.FileSystemObject")
Set TSet = fso.GetFile(fPath).OpenAsTextStream(1,-2)
GetSignature= TSet.readall
TSet.Close
EndFunction

Everything works apart from the pictures that are linked to the signature. I'm getting this error message in the body of the email.

upload_2015-6-1_18-13-44.png

I know how to attach the images to the email but I prefer them to be embedded into the email cover.

Any ideas on this one guys?

Thanks
Costas
 
Hi Chandoo,

I have this code to add a signature to an email merge.

Code:
Dim StrSignature AsString
StrSignature = GetSignature(sPath)
.HTMLbody = strbody & vbNewLine & vbNewLine & StrSignature

and the function is

Code:
Function GetSignature(fPath AsString)AsString
Dim fso AsObjectDim TSet AsObject
Set fso = CreateObject("Scripting.FileSystemObject")
Set TSet = fso.GetFile(fPath).OpenAsTextStream(1,-2)
GetSignature= TSet.readall
TSet.Close
EndFunction

Everything works apart from the pictures that are linked to the signature. I'm getting this error message in the body of the email.

View attachment 19396

I know how to attach the images to the email but I prefer them to be embedded into the email cover.

Any ideas on this one guys?

Thanks
Costas
 
Back
Top