outlook signature using delphi
Posted on 2012-08-23
Hi, I'm trying to send an email in delphi using outlook. What I need is for the outlook mail window to popup with my text as the body plus the user's signature.
Currently, all is working except that I can't modify the htmlbody once I'm getting the signature via getinspector. I can't even get the signature content without outlook getting a confirmation from the user.
I know I'm close to the solution but I don't know where to go from here. I have tried modifying the signature via wordapp but still the outlook confirmation pops up.
Outlook := GetActiveOleObject('Outlook.Application');
Outlook := CreateOleObject('Outlook.Application');
vMailItem := Outlook.CreateItem(olMailItem);
vMailItem.htmlbody := 'My html body' + vMailItem.htmlbody;
vMailItem.to := Edit2.text;
vMailItem.Subject := 'test email';