+ Reply to Thread
Results 1 to 13 of 13

Macro to attach the file to Outlook from excel

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    97

    Macro to attach the file to Outlook from excel

    Hi

    I am trying to add an attachment to the outlook mail using a macro… however when I have tired the below code…
    Attachment is not added

    I have made sure that I have changed the setting in the excel

    2) Tools>References in the Menu bar
    3) Placed a Checkmark before Microsoft Outlook 14.0 Object Library

    Please Login or Register  to view this content.
    Could someone kindly suggest the proper way.

    Thank you

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Macro to attach the file to Outlook from excel

    That's a lot of offsetting and selecting. Plus you have closed the email before attaching.

    Can you give us a breakdown of exactly where your data is? (i.e. what cells contain to, subject, etc)

    Or even better could you attach your workbook with sample data in place?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro to attach the file to Outlook from excel

    You misspelled 'Attachments':
    Please Login or Register  to view this content.
    rather than:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    03-11-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Macro to attach the file to Outlook from excel

    Test Template.xlsmI even corrected the spelling that didnt work...
    I am enclosing the sample... kindly assist

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Macro to attach the file to Outlook from excel

    Okay. You would like to send one email to each line? What is the attachment are you trying to add to the email?

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro to attach the file to Outlook from excel

    Try removing this line:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Macro to attach the file to Outlook from excel

    Hi, The link below may help.
    HTML Code: 
    Best Regards/VKS

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Macro to attach the file to Outlook from excel

    Please Login or Register  to view this content.
    Just change "Path to file to add" to the full path of the file you're trying to attach.
    Last edited by Solus Rankin; 04-07-2014 at 10:12 AM.

  9. #9
    Registered User
    Join Date
    03-11-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Macro to attach the file to Outlook from excel

    Hi Rankin

    Thank you so much...The Macro is working fine... However when I execute multiple mails are opening up.... can we limit to the row I select to excecute the mail??
    I want to send mail one at a time... not all at one time

    Kindly help

    Regards
    Kiran

  10. #10
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Macro to attach the file to Outlook from excel

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-11-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Macro to attach the file to Outlook from excel

    Thats it... this is what I am looking at... thank you soooooooo mucch... you are awesome.... it worked perfect..

  12. #12
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Macro to attach the file to Outlook from excel

    Glad to help.

    If you are happy with the solution please mark the thread as [SOLVED] using the thread tools at the top.

    And on any thread you can show appreciation to those who have helped by clicking the * below their post.

  13. #13
    Registered User
    Join Date
    03-11-2013
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Macro to attach the file to Outlook from excel

    Hi Rankin

    I have marked this thread as solved and clicked *. I have one question... Is it possible to make email body font to calibri 11p and color to Dark blue, Text 2.
    with the codes


    Regards
    Kiran kumar

+ 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. Macro to attach the file to Outlook from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 08:52 AM
  2. [SOLVED] How to prompt user to select file to attach to an E-Mail (Excel to Outlook)
    By TheLittlePrince in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 05:33 AM
  3. [SOLVED] attach file from folder on c:\ to outlook mail and send
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2013, 11:33 AM
  4. [SOLVED] Macro to create a pdf and attach to an email (Outlook)
    By jsedore in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-01-2013, 03:16 PM
  5. Automatically attach Excel spreadsheet to Outlook Email with Macro?
    By nbaj2k in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-01-2006, 11:45 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