CC'ing self

Dr. Demento

Well-known Member
Joined
Nov 2, 2010
Messages
618
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Using early binding, I have automated a batch of weekly emails; however, since I won't always be the one sending them, I wanted to insert code that would automatically include the sender in the CC line.

I've found the code below online, but all the examples seem to use late binding (or more likely, I'm not understanding how to implement it). I've tried converting to late binding, but I just break my code :confused: Fortunately, when I omit the line below, everything works fine. I'm calling this from Excel 2010.

Code:
with objMail
  .CC = objMail.Session.CurrentUser.addressEntry.GetExchangeUser().PrimarySmtpAddress

I know next to nothing about the settings, but per Outlook Data File Settings, it's running in Unicode mode against Microsoft Exchange and the Address Book is MAPI.

Any thoughts and good vibes would be most appreciated.
 
Last edited:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top