+ Reply to Thread
Results 1 to 4 of 4

Sending mail without outlook

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    Enugu
    MS-Off Ver
    enugu
    Posts
    50

    Sending mail without outlook

    Hi. I have a VBA that mails portion of a worksheet as PDF. The problem is that the process is not really automated as I have to open Outlook manually to allow the emails to send.

    I learnt there's a way emails can be sent using CDO. Can someone help me out?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Sending mail without outlook

    I use VBA to send mail using Outlook without having to open Outlook manually. The code should create an instance of Outlook, then take it down when done. However, if you insist on using CDO instead then this explanation should be helpful.

    You are asking a generic question. You can get advice specific to your problem if you attach your file or at least show your current code.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-12-2016
    Location
    Enugu
    MS-Off Ver
    enugu
    Posts
    50

    Re: Sending mail without outlook

    @ 6StringJazzer
    Here is my code:


    Please Login or Register  to view this content.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sending mail without outlook

    Have you checked out Ron de Bruin's excellent web site that deals with this?
    https://www.rondebruin.nl/win/s1/cdo.htm

    That handles sending a specific range in an email which is what your OP requested.

    There are other versions if you wish to attach a file/workbook and send by email.
    Last edited by Richard Buttrey; 07-15-2018 at 11:08 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sending ActiveSheet by Outlook E-mail
    By djsouljah in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-20-2013, 01:13 PM
  2. Macro for sending Outlook mail - Need help
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2013, 06:22 AM
  3. Sending E-mail from excel via outlook
    By Sasi1345262 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2013, 02:03 AM
  4. VBA code sending Outlook e-mail
    By dkub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2011, 06:30 PM
  5. Sending outlook mail using VBA
    By icylemontea in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-11-2010, 06:30 PM
  6. How to format text when sending mail to Outlook?
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2008, 11:18 AM
  7. Problems sending mail from Excel to Outlook
    By Big Chris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 12:44 PM

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