Problem with Signature and message body

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.
 
S

Sue Mosher [MVP]

The signature settings are specific to each user and are set in Tools |
Options.
 
J

John Covert

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
 
J

John Covert

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
 
J

John Covert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top