+ Reply to Thread
Results 1 to 2 of 2

Sub Routine to Send E-Mail from Excel with attachement not working. Help!

  1. #1
    Registered User
    Join Date
    07-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    27

    Sub Routine to Send E-Mail from Excel with attachement not working. Help!

    Hi,

    I am trying to use VBA to automatically type an E-Mail getting the user to select a file to attach to the E-Mail.

    I have managed to generate the E-Mail, allow the user to select the file to be attached, but the E-Mail being generated is not actually attaching the file.

    Can anyone see why this might be and how I might be able to recify it.

    Below is my code:

    Please Login or Register  to view this content.
    Many thanks,

    TLP

  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: Sub Routine to Send E-Mail from Excel with attachement not working. Help!

    Using True in that call means that the user can select multiple file names. That means that the result returned is an array. You cannot assign an array to AttachFileName. If you only want the user to select one file, change True to False and I think you'll find everything will work.

    If you want to attach multiple files, you must do this:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. i want to send a active excel file as attachement by using gmail
    By kks279 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2013, 01:44 PM
  2. Auto-send mail with attachement using VBA in Excel does not work on some PCs
    By Dominozzz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2013, 01:52 PM
  3. Send email automatically through excel with attachement and picture
    By yorkshirewhite in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-24-2011, 11:24 AM
  4. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 AM
  5. Replies: 2
    Last Post: 05-18-2005, 11:06 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