Question Outlook and signatures. Can they be added

wa4qms

New Member
Hi all. I was wondering if anyone has had any luck using the Outlook Signature option when creating an outlook email from 4gl? The base code is straight from Progress KB, but I just now wondered if I need to 'sign in' like I normally do? Not required in the sample code, but I'll give that a try. If you have able to add the signature, I'd sure like to know how.
Thanks!
Dennis
 

ForEachInvoiceDelete

Active Member
Depends how your interfacing with outlook. Via com handles or smtp or something else? I'm pretty sure I have added signatures via both of those methods in the last.
 

wa4qms

New Member
I am using the com-handles to open an instance of OutLook and set the variables there. I pulled the code straight from the ProgressKB.
olMail = olApp:CreateItem( 0 ).
olMail:TO = cEmailTo.
olMail:Subject = " Starting The June; Statements Emailed.".
olMail:HTMLBody = cHtmlBody.

There has to be some com-handle for a signature, but I have not been able to find it.
As different people will be using the base code, I need to be able to set that value at the time of the email being created. And at this time I cannot use a like to our web site as we do not maintain it. Bummer
 

Osborne

Active Member
I have this solution from many years ago for the auto signature but do not know if it is the one you are looking for:
Code:
DEFING VARIABLE vSignature AS CHARACTER NO-UNDO.
olMail = olApp:CreateItem( 0 ).
olMail:Display.
vSignature = olMail:HTMLBody.
olMail:To = cEmailTo.
olMail:Subject = "Starting The June; Statements Emailed.".
olMail:HTMLBody = cHtmlBody + CHR(13) + vSignature.
There is also one where you load the signatures stored on the users PC which is something similar to this:
Code:
DEF VAR vSignature AS LONGCHAR NO-UNDO.
COPY-LOB FROM FILE "C:\Users\<user.name>\AppData\Roaming\Microsoft\Signatures\<signature>.html" TO vSignature.
olMail = olApp:CreateItem( 0 ).
olMail:To = cEmailTo.
olMail:Subject = "Starting The June; Statements Emailed.".
olMail:HTMLBody = cHtmlBody + CHR(13) + vSignature.
 
Top