Adding af signature file at the end of the body text

  • Thread starter Thread starter kurt
  • Start date Start date
K

kurt

Hi

I tried to put in the signature after I have made a mailtext in VBA ,
but the text is replaced by the signature

the code is like this

v=" Myletter text"
With OutMail
.to = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "Subject text"

.body = v & Chr(13) & shell(" path\mydoc.htm")
end with

Anyone have a solution

regards

kurt
 
If you want to append and not replace text, you need to include the original text:

.Body = .Body & vbCrLf & "some new text"

You probably have a bit more work to do, though, but I can't quite tell what you're trying to do. I do know that a Shell command is not going to read the content of the HTML file into a string variable. Neither is HTML content going to translate well into the text body of the message.
 
Thank you Sue

I have a signature function on Outlook but I can not control it from
VBA.
This means that your "some new text" should be the text in the
signature file either a .HTM or a .DOC or a .RTF file
or just turn on the insert signature function form VBA

regards

Kurt
 
If you're trying to use an existing signature, you probably don't need to read in the text. See http://www.outlookcode.com/codedetail.aspx?id=615 for code sample.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


kurt said:
Thank you Sue

I have a signature function on Outlook but I can not control it from
VBA.
This means that your "some new text" should be the text in the
signature file either a .HTM or a .DOC or a .RTF file
or just turn on the insert signature function form VBA

If you want to append and not replace text, you need to include the original text:

.Body = .Body & vbCrLf & "some new text"

You probably have a bit more work to do, though, but I can't quite tell what you're trying to do. I do know that a Shell command is not going to read the content of the HTML file into a string variable. Neither is HTML content going to translate well into the text body of the message.
 
Back
Top