vba - Current contact email template -
I have the code to open the Outlook 2010 template. When I have a contact record open from my public exchange folder I want to populate the To: field with the e-mail address from the current contact record.
Here is the code.
Sub Sender (set) Set Message =. Application = CreateItemFromTemplate ("\\ locationofagreementtemplate \ Agreement.oft Send") message. Display end sub
Assume that the contact is selected in explorer. If it is actually opened in an inspector, then change the fist line to Set contact = application. ActiveInxXactor Set contact = application. Active Explorer Selection (1) If Contact.Type = olContact then message. Receipts Add contacts. Email1Address End if
Comments
Post a Comment