+ Reply to Thread
Results 1 to 2 of 2

Multiple Issues: Macro not opening new email message or email body not updating

  1. #1
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Multiple Issues: Macro not opening new email message or email body not updating

    G'day Everyone,

    Attached is a .xlsm file that has a macro that generated a pdf file (saved on desktop) then opens up a new email message (outlook) then embeds information from a selected area from the workbook into the body of the email then attaches the pdf file then deletes the pdf off the desktop.

    When this macro does work and opens up new email message changes being made in the workbook will not update within the body of the email but the pdf will have the updated information.

    When this macro doesn't work the only thing does work is the pdf file being generated and deleted.

    By the way I'm still a beginner at macros and I've spend a few hours with Uncle Google putting this macro together.

    MS Excel Version Office 365
    Attached Files Attached Files
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Multiple Issues: Macro not opening new email message or email body not updating

    Hi ratcat,

    MS Excel Version Office 365
    Please update your profile to reflect your Office Version.
    -----------------

    After looking at your code it looks like you want:
    a. HTML body
    b. Range as a picture in the Body
    c. Standard Outlook Signature
    d. Attachment

    Try the following code which is included in the modified copy of your Sample Workbook:
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). https://www.excel-easy.com/vba/examp...-explicit.html

    Lewis

    Please NOTE that HTML code is NOT allowed by the ExcelForum Firewall. Replace all occurrences of '$$$' with '<' and all occurrences of '%%%' with '>' above

+ 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. VBA/Macro to email new range in body of email
    By excel.junkie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-17-2018, 01:12 PM
  2. Replies: 0
    Last Post: 05-28-2018, 09:53 AM
  3. [SOLVED] VBA to email pre-defined range in the email message body
    By JDobbsy1987 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-05-2017, 08:04 PM
  4. Replies: 2
    Last Post: 05-09-2013, 09:56 PM
  5. Replies: 0
    Last Post: 02-21-2013, 04:46 AM
  6. Replies: 2
    Last Post: 08-01-2012, 02:47 PM
  7. Replies: 6
    Last Post: 12-02-2011, 02:14 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