Problem with Signature and message body

  • Thread starter Thread starter Gary Clark
  • Start date Start date
G

Gary Clark

I have written an Outlook Com Addin (VB6) that modifies
the body of the mail message being sent. It adds a header
to the begining of the message before it is sent. The
problem is, if a forwarded message (that has an auto added
signature) is sent, another signature is inserted into the
message(body) prior to the header I add. If I look at the
message during processing it is correct, however when you
go back into outlook and open the message the additional
siginature is inserted prior to the header. I have not
been able to find where (programmatically) I can find how
the signature is added and maybe I can turn it off. Any
help would be greatly appreciated. Thanks in advance.
 
The signature settings are specific to each user and are set in Tools |
Options.
 
Gary,

Are you saying that the Signature gets added to the message TWICE? Once
when the Inspector is opened and once AFTER your code runs and adds its
header?

John
 
Interestingly, Sue, I am seeing the same thing here this morning. My Add In
gets the Body of an email, changes it, then attempts to send it. But if I
say:

oMailItem.Body = stringMyNewBody

The result is the new body PRECEDED by the signature.

If I say:

oMailItem.Body = ""

the oMailItem.Body is populated with the Signature. I cannot clear
oMailItem.Body. UNLESS I set .BodyHTML to "". Then I can do with .Body as
I please.

Bottom line appears to be that (this is OL2002) is .BodyFormat = 1, then the
Body property cannot be set correctly.

John
 
Also for posterity:

In my code, no matter what I set MailItem.Body to be, it becomes the
signature. I added some code to first .Save the MailItem, and then setting
..Body works well.

John
 
Back
Top