+ Reply to Thread
Results 1 to 14 of 14

Send mails attaching files with HTML body range of content

  1. #1
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Send mails attaching files with HTML body range of content

    Hi All,

    I am looking for help to send mails attaching files from folder with the body of outlook message in HTML format similar to what is attached in the word document.

    Attached excel filr Maisl a different file(s) to each person in a range

    The Macro will loop through each row in the sheet and if there is a E-mail address in B
    and filenames that exist in the row it will create a mail with this information and send it.

    This TRY ME macro will attach the file to each person email in range column B. It is creating mail with the information.

    But I am looking for a macro or method how to have the contents from the attached word document to apprear in the body of the outlook email. Please try to run the above TRY ME macro. When it opens the outlook mail message I want the contents of the
    word documents in the body of the outlook message. Please help

    See attached macro excel file and the word document contents.
    Attached Files Attached Files
    Last edited by vijanand1279; 08-10-2011 at 03:35 PM.

  2. #2
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Send mails attaching files with HTML body range of content

    Could someone please help.

    Regards,
    Vijay

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    Hi Vijay
    I can't tell from your code what you're trying to accomplish. It must be in the early stages of development. Is the Word Document an ACTUAL DOCUMENT or is it just an example of what you're looking for to insert into the body of the email?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Send mails attaching files with HTML body range of content

    Word document is just an example. But I want it to be similar to that with table border and the contents inside that. May be the word document will be with more lines. But I would happy to see a method from the attached word document itself.

    Please help.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    Hi Vijay

    While it's still not clear to me what you're after, the attached incorporates into the email body the contents of what was included in your Word document.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Send mails attaching files with HTML body range of content

    Hi John,

    This is what I am exactly looking for. This code works untill a new mail message is created. Is there a way where the mails should be be sent automatically once the macro is executed. That would be very helpful since it will save time from sending each individual mails that opens.

    Please help

    Regards,
    Vijay

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    Hi Vijay

    In the sub Send_Files, change the line of code that says .Display to .Send as follows:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Send mails attaching files with HTML body range of content

    Jaslake,

    I don't think that will solve the problem. Outlook is going to intercept every one of the email SEND commands, built-in security. The end result will be the same, except now the macro is stalled until you press OK in Outlook...
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    @JBeaucaire

    I think you may be correct...I see the OP is using Excel 2003 so I'd presume Outlook 2003. I'd forgotten about that security issue with 2003.

    I've tested only with Outlook 2007 as that's what I have. Outlook 2007 doesn't present the same issue.

    @vijanand1279...Sorry Vijay...I don't have a workaround.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Send mails attaching files with HTML body range of content

    Excel 2007 doesn't have this security feature? You can send emails from Excel into Outlook with no problem? Hmm....

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    @JBeaucaire

    That's correct. Outlook 2007 does not have this issue when sending emails from Excel 2007 or Excel 2000. Outlook 2007 will send immediately without a security message.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Send mails attaching files with HTML body range of content

    Heh, that alone may be reason enough for me to finally upgrade. I just HATE the 2007+ interface.

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    @JB
    Took me a while to get accustomed to it...now I have a bit of a problem navigating back to Excel 2000

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send mails attaching files with HTML body range of content

    Researching another issue I found this link which addresses the Security issue http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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