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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -