+ Reply to Thread
Results 1 to 10 of 10

Copy from Excel to Outlook as HTML

Hybrid View

vjethk Copy from Excel to Outlook as... 12-07-2012, 12:51 PM
TMS Re: Copy from Excel to... 12-07-2012, 01:24 PM
vjethk Re: Copy from Excel to... 12-07-2012, 11:11 PM
event21 Re: Copy from Excel to... 12-08-2012, 01:16 AM
vjethk Re: Copy from Excel to... 12-09-2012, 01:35 PM
vjethk Re: Copy from Excel to... 12-08-2012, 03:42 AM
event21 Re: Copy from Excel to... 12-08-2012, 04:04 AM
vjethk Re: Copy from Excel to... 12-08-2012, 04:41 AM
vjethk Re: Copy from Excel to... 12-08-2012, 04:43 AM
event21 Re: Copy from Excel to... 12-08-2012, 05:07 AM
  1. #1
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Copy from Excel to Outlook as HTML

    Hi -

        With outlookMail
            .to="theemailaddress"
            .htmlBody = htmlBody
            .attachments.Add ThisWorkbook.Path & "\" & oneSheet.Name & ".xlsx"
            .Display
        End With
    Regards,
    Event

  2. #2
    Registered User
    Join Date
    12-03-2012
    Location
    mandya
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Copy from Excel to Outlook as HTML

    I'm getting a run time error 9

    Subscript out of range

    Sheets(oneSheet.Name).Copy in this line.

    Cant really figure out whats wrong

  3. #3
    Registered User
    Join Date
    12-03-2012
    Location
    mandya
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Copy from Excel to Outlook as HTML

    Quote Originally Posted by event21 View Post
    Hi -

        With outlookMail
            .to="theemailaddress"
            .htmlBody = htmlBody
            .attachments.Add ThisWorkbook.Path & "\" & oneSheet.Name & ".xlsx"
            .Display
        End With
    Regards,
    Event
    This code will work if the email address is same for all the sheets. But in my case I need to send the mails to different addresses

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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