+ Reply to Thread
Results 1 to 3 of 3

Pasting a range from an Excel workbook to Outlook sometimes doesnt carry formatting over

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Washington, United States
    MS-Off Ver
    Excel 2007
    Posts
    21

    Pasting a range from an Excel workbook to Outlook sometimes doesnt carry formatting over

    Hello,

    I have a workbook that I've developed through recording macros as well as using published code (Ron de Bruin) that when the workbook is opened call's my sub procedures.

    Please Login or Register  to view this content.
    Basically it removes the old data from a sheet, re-connects to my data source (Access pass through query), formats the table after the data is returned, and then copies the table range and puts it into an email, sends the email, and then kills Excel.

    The issue I'm having is that it worked initially, but now it puts the table range into the email without the formatting that I apply in Excel.

    Any idea what might be occuring here?

    Thank you!
    Last edited by mbhc77; 08-28-2012 at 11:19 AM.

  2. #2
    Registered User
    Join Date
    08-23-2012
    Location
    Washington, United States
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Pasting a range from an Excel workbook to Outlook sometimes doesnt carry formatting ov

    Here is the VBA code in my module. I had to remove the Sub ConnectDB because it had sensitive information but other than that it's all there. The first few times I ran the report the formatting carried over to the email but not anymore.

    Please Login or Register  to view this content.
    Thank you for any help, this has been super frustrating.

  3. #3
    Registered User
    Join Date
    08-23-2012
    Location
    Washington, United States
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Pasting a range from an Excel workbook to Outlook sometimes doesnt carry formatting ov

    I think I figured this out.

    I added this line to my FormatData sub procedure:

    Please Login or Register  to view this content.
    Basically this just converts my table to a range before calling the email sub's.

    Hope this helps someone else.

+ 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