+ Reply to Thread
Results 1 to 16 of 16

Email workbook to specific person and cc others

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Email workbook to specific person and cc others

    Hi, please may you assist in updating the following code to be able to email the workbook to a specific person and cc others.
    Thanks

    Please Login or Register  to view this content.
    Last edited by Cutter; 10-22-2012 at 07:37 PM. Reason: Added code tags

  2. #2
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Try following code.

    Please Login or Register  to view this content.
    Also make Folder named "Temp" in your D drive before running the code.

    Thanks,
    Tejas

  3. #3
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Thank you very much! Your help is highly appreciated. Am i correct in assuming that the .sendmail command as in the original coding will work with any default mail client as specified in windows whereas your coding is outlook specific. I ask this because i will have to incorporate a command taking into account that the users will have different email clients. If .sendmail does not allow for a cc function, then i will have to give the user an option to send with outlook or other email client.
    Thank you!

  4. #4
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Yes the problem with SendMail is it doesn't allow CC field as far as I know.
    That's why I have taken object of Outlook in my code and so it won't work with other email clients.

    But there might be code for other email clients too and you can write code specific to that particular email client.

  5. #5
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Thanks, with regards to offering the user the choice between outlook and other email client, will a InputBox and IF statements be the best solution? May i pm you with another question or 2, please?

    Thanks!

  6. #6
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Instead of InputBox, I will suggest you to create a UserForm. In that you will get option of Dropdown list too.

    Yes you can PM me!

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Email workbook to specific person and cc others

    @ CaptMcK

    Welcome to the forum.

    Please notice that [CODE] tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

    Also, please keep your questions in the forum as opposed to PM's so that others can learn from them. There is, in fact, a rule against it:

    Rule 4 of our Forum [/I]RULES. Don't Private Message, Visitor message or email questions to moderators or other members. All questions and answers will benefit other posters like yourself. The point of having a public forum is to share solutions to common (and sometimes uncommon) problems with all members.

  8. #8
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Hi, my appologies... will do so in future. tx!

  9. #9
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    How do i get the message to open in outlook with all the info and attachment but ready to be sent manually?
    tx

  10. #10
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Sorry I didn't get what you are trying to convey.

    Can you please clarify in detail?

  11. #11
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Sorry! in the outlook code you provided: How do adjust for creating and new message, adding the TO and CC information, attaching the workbook and then finally opening the message (as the .sendmail command does) to be sent manually. The code you provided does all this automatically but i'd like to adjust it so that the message window pops up and i can choose from which account to send it from or add a message, etc......tx!

  12. #12
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Just replace .Send by .Display

  13. #13
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Will try that! Thanks a lot

  14. #14
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Hi Tejas, thanks for your help on this, i've created a form which is opened by clicking the email button and modified the code as follows:

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Email workbook to specific person and cc others

    Hi,

    Thats great. Your additions to the code are just perfect!

    Please don't forget to mark the thread as Solved and Add to my reputations if you find it proper.

    Thanks,
    Tejas

  16. #16
    Registered User
    Join Date
    10-22-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email workbook to specific person and cc others

    Awesome! Thanks for all your assistance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1