View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
BDT BDT is offline
external usenet poster
 
Posts: 13
Default Printing truncates cell contents

Hi Dave,

Giving this some more thought, I came up with an alternative, brute force
solution that seems reasonable. I just cut and pasted the entire column from
my spreadsheet and pasted it into MS Word. After a couple of trial and error
attempts to tweak the width of the Excel column, it pasted right in to Word
and seems to display pretty well. There are a few cells with an extra blank
line at the bottom, but all-in-all a workable way to output the hundreds of
cells. To avoid other printer problems, I can even output the Word doc as a
pdf and anyone using it will see the same thing.

I'm guessing this is a bug in xl, but at least I can move on.

thanks again, BDT

"Dave Peterson" wrote:

I think it's either going to be a manual effort (row by row) if you hate the
extra line within the cell for the rows that currently print ok.

One of the things that would concern me is that the paper copy may look fine on
my printer, but if I share it with others, it may not look fine for them.

If you decide to add that extra alt-enter to just the cells you want, you could
select the range first and use a macro to do the work.

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeConstants, xlTextValues), _
ActiveSheet.UsedRange)
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "Try another selection!"
Exit Sub
End If

For Each myCell In myRng.Cells
If Right(myCell.Value, 1) = vbLf Then
'already there, so skip this cell
Else
myCell.Value = myCell.Value & vbLf
End If
Next myCell

End Sub