+ Reply to Thread
Results 1 to 4 of 4

Attach & copy data from workbook to mail via VBA

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    22

    Attach & copy data from workbook to mail via VBA

    HI All,

    I have an excel file recorded with macro already.

    Each and every time I run it, I will get a data like the excel file which i have attached.

    I need a vba for copy pasting the data from a sheet call "pivot1" in the excel(attached) to the outlook body, also the entire excel workbook needed to be attached along with this email and sent to the respective recipient.

    NOTE: Every time the macro runs i will get new data, so the file should not get saved.

    Kindly refer the excel file attached.

    Please help me with this.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Attach & copy data from workbook to mail via VBA

    .
    .
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-12-2014
    Posts
    22

    Re: Attach & copy data from workbook to mail via VBA

    HI Logit,

    Thanks for your script,

    Your scripts is working fine without my macro,

    But when I run along with my macro it is not working fine,

    It sends mail with attachment, but when I open the atatchment the atachment is Empty.

    Also generates two mail for the same.

    Herewith I have atatched my complete VBA,

    Kindly modify the script.

    Thanks In advance
    Attached Files Attached Files

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Attach & copy data from workbook to mail via VBA

    I don't understand.

    The project copies and pastes sheet PIVOT1 to the body of the email and also attaches the workbook to the email.

    What other action / s are you needing the code to do ?

+ 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. Replies: 0
    Last Post: 05-19-2017, 12:05 PM
  2. [SOLVED] Copy Activesheet and Other Sheets to Temporary Workbook and Attach to Email
    By v.rodgers in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-03-2015, 05:50 AM
  3. Replies: 1
    Last Post: 12-02-2014, 06:13 AM
  4. Replies: 1
    Last Post: 03-11-2014, 12:44 PM
  5. How to attach mail Id's to BCC
    By venkatkumar744 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2013, 05:46 AM
  6. click on mail address, print specific page to pdf, attach it to mail
    By Crosplit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2013, 04:54 AM
  7. code to attach the draft mail in new compose mail as attachment in outlook 2010
    By priya1987 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 08:38 AM

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