PDA

View Full Version : Solved: Generating an email in Excel- adding signature



ukdane
06-30-2009, 12:44 AM
I have a small code in Excel that generates an email in Outlook (based on the input from that email.
How do I get the Excel code to automatically add my signature (that s found in Outlook)?

joms
06-30-2009, 01:04 AM
are you using office 2007? check out this link
http://office.microsoft.com/en-us/excel/HA100997681033.aspx

ukdane
06-30-2009, 01:50 AM
Hi,
No I'm using 2003. Also, It's not a DIGITAL signature I'm talking about, it's a regular email signature.

Also, how do I make an EMAIL format to be HTML instead of Rich text or plain?
Set OLApp = CreateObject("Outlook.Application")
Set EmailItem = OLApp.CreateItem(0)

I assume I have to define the type or format here.

Any clues?

Cheers

p45cal
06-30-2009, 02:14 AM
I don't know about adding a digital signature but these may help:
http://www.rondebruin.nl/mail/folder3/signature.htm
http://www.outlookcode.com/codedetail.aspx?id=615
(Sue Mosher is pretty much the authority on Outlook vba)

Regarding the the format (I think it would use the default format in outlook anyway):
EmailItem.BodyFormat = olFormatHTML
but the olFormatHTML might have to be replaced with 2 if no reference to the Outlook Object library has been set under Tools|references in the VBE.

ukdane
06-30-2009, 03:15 AM
P45cal. Thanks for your help. I needed to use Bodyformat = 2.

Again, I'm NOT trying to add a Digital Signature, just my regular email signature, which doesn't appear when the email is created via the vba.

p45cal
06-30-2009, 03:26 AM
I don't think either of the two links I gave refer to digital signatures, both seem to refer to email signatures.

ukdane
06-30-2009, 05:58 AM
Thanks it works.