+ Reply to Thread
Results 1 to 6 of 6

Help required in sending file as an attachment.

  1. #1
    Registered User
    Join Date
    03-06-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    79

    Help required in sending file as an attachment.

    Hi Guys,


    I found this on excel forum.
    I am trying to modify the code. This code is working but its not sending the temp file as attachment. Please Help I just want to modify this code so that i can send the temp file in attachment.

    Thanks in advance

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

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Help required in sending file as an attachment.

    The code attaches the workbook for me, even though it has no data in it.

    You have a few lines that are deleting the rows.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Help required in sending file as an attachment.

    Hi there,

    I'm probably missing something, but when I run your code it generates an email with a .htm attachement - admittedly the attachment contains only a header because all of the entries in your workbook are more than 120 days old.

    Do you want to attach a copy of your temporary workbook as an Excel file (.xlsx, .xlsb)?

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    03-06-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    79
    Hi Greg

    I just want to attach a copy of temporary workbook as an excel file .xlsb


    Quote Originally Posted by Greg M View Post
    Hi there,

    I'm probably missing something, but when I run your code it generates an email with a .htm attachement - admittedly the attachment contains only a header because all of the entries in your workbook are more than 120 days old.

    Do you want to attach a copy of your temporary workbook as an Excel file (.xlsx, .xlsb)?

    Regards,

    Greg M

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Help required in sending file as an attachment.

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Help required in sending file as an attachment.

    Hi again,

    Many thanks for the Reputation increase - much appreciated!

    Glad I was able to help.

    Best regards,

    Greg M

+ 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 email with pdf attachment
    By fride360 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-29-2020, 10:26 AM
  2. Sending Attachment via VBA Not Working
    By daveyc18 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2014, 05:52 PM
  3. Sending Attachment via VBA Not Working
    By daveyc18 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2014, 11:51 AM
  4. [SOLVED] Sending attachment in email using vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-18-2014, 10:02 AM
  5. Sending NOT excel file as an attachment via Excel
    By Sahak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2008, 04:40 PM
  6. [SOLVED] Sending 1 worksheet of a workbook as email file attachment
    By JLG in forum Excel General
    Replies: 1
    Last Post: 02-27-2006, 11:20 PM
  7. [SOLVED] Sending exel attachment
    By Jay in forum Excel General
    Replies: 3
    Last Post: 01-19-2005, 04:06 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