Results 1 to 3 of 3
  1. #1
    billybeer is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Posts
    27

    adding current user to CC line of outlook email

    I have a Access report with a command button that sends an email (with the report as PDF attachment) to a Outlook user. I want to add the current user to automatically be CC'ed on the email. Currently what I have is:



    Code:
     DoCmd.SendObject acSendReport, , acFormatPDF, "billybeer@youremail.com", , , "Daily Log", "Daily Log attached", True
    This opens Outlook with the attachment and the recipient as I want it.

    What do I add to get the email of current user added to the CC line.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    sPersonToCC=Environ("Username") & "@youremail.com"

    DoCmd.SendObject acSendReport, , acFormatPDF, "billybeer@youremail.com",sPersonToCC , , "Daily Log", "Daily Log attached", True

  3. #3
    billybeer is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Posts
    27
    Thank you - works as I want.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Line feed for use in MS Outlook email
    By aytee111 in forum Programming
    Replies: 10
    Last Post: 10-21-2016, 12:50 PM
  2. Replies: 2
    Last Post: 02-14-2016, 11:19 AM
  3. Replies: 5
    Last Post: 09-14-2015, 07:24 AM
  4. Replies: 7
    Last Post: 11-27-2013, 08:37 AM
  5. Replies: 7
    Last Post: 11-19-2013, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums