+ Reply to Thread
Results 1 to 9 of 9

Cell text "clipped" in Print Preview

  1. #1
    Registered User
    Join Date
    03-15-2010
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Cell text "clipped" in Print Preview

    Hi Experts,

    I've been searching the Internet for a long time, for a solution to the following problem:
    An Excel cell containing word wrapped text, can have trailing text "clipped" in the Print Preview. This problem can be found in many posts, and has been described in many different ways. The typical "fix" for this problem has been to avoid the Excel cell character display limit of 1024. Or to insert a few "carriage return line feeds" into the text string to beat the limit. However this problem occurs when the text string is well below the limit of 1024 characters.
    I have created an example subroutine that displays the basic problem.
    1. Set the column width of "A" to be 69.57
    2. Run the Workbook_Open subroutine
    3. Examine Print Preview, and notice that the end of the sentence does not Wrap, and is clipped. It's well below 1,024 cell limit, so something else is causing this.

    The Right Margin is set near the middle of the page, so that word wrapping can be demonstrated. This occurs in Excel 2003 ans Excel 2007.
    Is there anyone who could solve the root cause of this problem? If you can, I'm sure it will also solve many other Posts related to this one.

    Many thanks,
    Pete

    Please Login or Register  to view this content.
    Last edited by PetersBase; 09-02-2010 at 06:03 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Cell text "clipped" in Print Preview

    I see no anomalies.
    Attached Files Attached Files
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-15-2010
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Cell text "clipped" in Print Preview

    Hi shg,
    Thanks for your reply, and your attachment, but doing it manually does not produce the effect.
    The problem of "clipping" is a little difficult to demonstrate, and that's why I posted the code example, because these particular settings show the effect. If you run the code you will get the "clipping".
    Regards,
    Pete.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Cell text "clipped" in Print Preview

    I ran the code (which is in the workbook I posted), print-previewed, screen grabbed the preview, and pasted the picture in the workbook. What am I missing?
    Last edited by shg; 08-31-2010 at 07:31 PM.

  5. #5
    Registered User
    Join Date
    03-15-2010
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Cell text "clipped" in Print Preview

    Hi shg,

    In the code module it says: 'Manually set Column "A" width to "69.57", and that was missing in your workbook.
    Alternativelly, add this code to the code module to set column "A" width automatically:
    Worksheets("Sheet1").Columns("A:A").ColumnWidth = 69.57
    With that statement in place, the "clipping" in Print Preview will occur. It seems that for certain conditions of column width and cell text length, the Print Preview will show clipping. I've seen this on several occations in my Excel project, and I've tried to analyse this with the basic code module in this post. I've tried a code "work-around" where I've split cell text into a number of seperate cells every time a full stop is detected. This seemed to work, but unfortunately the "clipping" still occured on some lines of text. My Excel project produces a large amount of print documentation, and the randomness of this "clipping" does concern me.

    Regards,
    Pete.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Cell text "clipped" in Print Preview

    I changed the Normal font to Arial (the Excel 2003 default), set the column width, and still see no anomalies.

    You may have an issue with your printer driver.

  7. #7
    Registered User
    Join Date
    03-15-2010
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Cell text "clipped" in Print Preview

    Hi shg,
    I've changed my column width for "A" in steps of 10, from 30 upwards, and I get "clipping" in the Print Preview at column width "60". It seems to be some criticaI column width for this to occur.
    I am using:
    Worksheets("Sheet1").Columns("A:A").ColumnWidth = some incremental number.

    I don't think it is the printer driver because I get it in the Print Preview of Excel.
    Regards,
    Pete.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,018

    Re: Cell text "clipped" in Print Preview

    FYI, cross-post and resolution here.

    In future if you cross-post, please provide links to the other post(s).
    Everyone who confuses correlation and causation ends up dead.

  9. #9
    Registered User
    Join Date
    03-15-2010
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Cell text "clipped" in Print Preview

    Using my test example, and a lot of fiddling about with the code, I have managed to solve this issue!

    How to prevent loss of text at the end of a string (“clipping”), in Print Preview, and printing?

    1. Make sure a cell does not contain more than 1024 characters (formatted “General”).

    2. Make sure the cell width containing the text, is just less than the Right Margin setting. The cell width is indicated in the Print Preview by a small “marker” at the top of the page. This becomes visible when “show margins” is selected. If this cell width marker is “equal to” or “greater than” the Right Margin setting, then text “clipping” will occur at the end of the string, in Print Preview (and therefore when Printed).

    At last after a few days of investigating this issue, I can now move on with my Excel project with confidence that I’m not loosing data when printing!

    I hope this information helps anyone else having this problem.

    Cheers,
    Pete.

+ 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