+ Reply to Thread
Results 1 to 3 of 3

VBA code Excel to Outlook email truncating cells

  1. #1
    Registered User
    Join Date
    06-22-2018
    Location
    South Australia
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    15

    VBA code Excel to Outlook email truncating cells

    Hi,

    I have some code to create an email in Outlook (which I "stole" and adapted from somewhere else - I don't remember where).

    The body of the email comes from some cells in a spreadsheet. It works OK except that the cells are truncated to the width of the cell that they are in (and it loses some formatting but I can live with that).

    i.e. the text in the cells is ~190 characters long but only ~ 20 are appearing in the email.

    I can't widen the column in the spreadsheet as it looks crap and will affect other parts of the spreadsheet.

    Any ideas?

    For some reason it won't allow me to post the bit of code that has the email address here - telling me I'm not allowed to post links, images or videos. I have made it so it doesn't look like an email address

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Last edited by Novice64; 06-05-2020 at 12:58 AM.

  2. #2
    Registered User
    Join Date
    05-14-2020
    Location
    Mauritius
    MS-Off Ver
    Office 365
    Posts
    97

    Re: VBA code Excel to Outlook email truncating cells

    Hi,

    what if you just widen the columns in the code RangeToHTML in the beginning and in the end of this macro you set it back to normal width?
    Then you should have the right text in your email.
    Greetings

    Tor


  3. #3
    Registered User
    Join Date
    06-22-2018
    Location
    South Australia
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    15

    Re: VBA code Excel to Outlook email truncating cells

    Thanks Tor, that's a pretty good idea.

    Inspired by this sort of thinking I tried just expanding the range to A36 to O46 and this also had the full text (even though it's all in column A).

    Now I just need to see if I can append to the email body from other arts of the spreadsheet......

    But that's for another thread.

    Nov

+ 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. Replies: 3
    Last Post: 03-11-2019, 05:31 PM
  2. [SOLVED] Add new code to exporting email data from Outlook to Excel
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2016, 08:32 AM
  3. VBA code to make Excel send an email via Outlook
    By vanni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-27-2015, 06:26 AM
  4. Code to email range as a picture from excel to outlook.
    By Johnny247 in forum Excel General
    Replies: 2
    Last Post: 06-16-2014, 03:14 PM
  5. Code to email with outlook from excel
    By fbiasi in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 03-10-2014, 04:58 PM
  6. [SOLVED] VBA Code to select Range of cells as Email Body In Outlook
    By naveenmarapaka in forum Outlook Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2013, 06:43 AM
  7. email from cells to outlook - code not working
    By periro16 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 12:05 PM

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