Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Printing wrapped text

I am having an issue printing text that is wrapped. It is NOT a merged cell;
the column has a fixed width; the cell has wrap text turned on and it is set
to auto fit. (This is important as I have a workbook with over 150
worksheets; each worksheet has 27 rows with text in this column and each row
in each sheet is different; some have several sentences and some have two
words. So I cannot take the time to manually adjust these rows.)

When I look at the text on my screen it shows up perfectly. When I print on
one printer it comes out fine; on another printer it cuts off the bottom line
on some rows and cuts into the bottom line on many others. I assume this is
some kind of printer problem. Is there a way I can fix it for ANY printer? I
am going to have to send this workbook to someone else when it is finished
and I have no idea what that person's printer will do.

Any help is much appreciated. Thanks!

Stacy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Printing wrapped text

Maybe you could add an alt-enter as the last character in the cell.

You'll see an "extra" line on some printers, but at least the last line being
chopped won't matter.

stacyjean622 wrote:

I am having an issue printing text that is wrapped. It is NOT a merged cell;
the column has a fixed width; the cell has wrap text turned on and it is set
to auto fit. (This is important as I have a workbook with over 150
worksheets; each worksheet has 27 rows with text in this column and each row
in each sheet is different; some have several sentences and some have two
words. So I cannot take the time to manually adjust these rows.)

When I look at the text on my screen it shows up perfectly. When I print on
one printer it comes out fine; on another printer it cuts off the bottom line
on some rows and cuts into the bottom line on many others. I assume this is
some kind of printer problem. Is there a way I can fix it for ANY printer? I
am going to have to send this workbook to someone else when it is finished
and I have no idea what that person's printer will do.

Any help is much appreciated. Thanks!

Stacy


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Printing wrapped text

Dave,

I thought about doing that, but I don't know how to "automatically" add
alt-enter to all of these cells. As I mentioned, I will have a total of over
3,000 cells like this - all with different text. I definitely don't want to
have to manually add the alt-enter. I wasn't sure how to write a VBA code for
it or if there was a simpler way to add alt-enter to all of the cells.

Stacy

"Dave Peterson" wrote:

Maybe you could add an alt-enter as the last character in the cell.

You'll see an "extra" line on some printers, but at least the last line being
chopped won't matter.

stacyjean622 wrote:

I am having an issue printing text that is wrapped. It is NOT a merged cell;
the column has a fixed width; the cell has wrap text turned on and it is set
to auto fit. (This is important as I have a workbook with over 150
worksheets; each worksheet has 27 rows with text in this column and each row
in each sheet is different; some have several sentences and some have two
words. So I cannot take the time to manually adjust these rows.)

When I look at the text on my screen it shows up perfectly. When I print on
one printer it comes out fine; on another printer it cuts off the bottom line
on some rows and cuts into the bottom line on many others. I assume this is
some kind of printer problem. Is there a way I can fix it for ANY printer? I
am going to have to send this workbook to someone else when it is finished
and I have no idea what that person's printer will do.

Any help is much appreciated. Thanks!

Stacy


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Printing wrapped text

You'll have to adjust the range that contains those long strings. I used
A1:A9999.

Option Explicit
Sub testme02()

Dim myRng As Range
Dim myCell As Range
Dim myAddr As String
Dim wks As Worksheet
Dim iCtr As Long

Dim CalcMode As Long
Dim ViewMode As Long

Application.ScreenUpdating = False

CalcMode = Application.Calculation
Application.Calculation = xlCalculationManual

ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView

'what range contains those strings?
myAddr = "A1:A9999"

iCtr = 0
For Each wks In ActiveWorkbook.Worksheets
Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(wks.Range(myAddr), _
wks.Range(myAddr).Cells _
.SpecialCells(xlCellTypeConstants, xlTextValues))
On Error GoTo 0

If myRng Is Nothing Then
'do nothing on this sheet
Else
For Each myCell In myRng.Cells
iCtr = iCtr + 1
If iCtr Mod 50 = 0 Then
Application.StatusBar = "Processing: " _
& myCell.Address(external:=True)
End If

If Trim(myCell.Value) = "" Then
'skip it
Else
If Right(myCell.Value, 1) = vbLf Then
'already has one, so skip it
Else
myCell.Value = myCell.Value & vbLf
End If
End If
Next myCell
End If
Next wks

'put things back to what they were
Application.Calculation = CalcMode
ActiveWindow.View = ViewMode
Application.ScreenUpdating = True
Application.StatusBar = False

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

stacyjean622 wrote:

Dave,

I thought about doing that, but I don't know how to "automatically" add
alt-enter to all of these cells. As I mentioned, I will have a total of over
3,000 cells like this - all with different text. I definitely don't want to
have to manually add the alt-enter. I wasn't sure how to write a VBA code for
it or if there was a simpler way to add alt-enter to all of the cells.

Stacy

"Dave Peterson" wrote:

Maybe you could add an alt-enter as the last character in the cell.

You'll see an "extra" line on some printers, but at least the last line being
chopped won't matter.

stacyjean622 wrote:

I am having an issue printing text that is wrapped. It is NOT a merged cell;
the column has a fixed width; the cell has wrap text turned on and it is set
to auto fit. (This is important as I have a workbook with over 150
worksheets; each worksheet has 27 rows with text in this column and each row
in each sheet is different; some have several sentences and some have two
words. So I cannot take the time to manually adjust these rows.)

When I look at the text on my screen it shows up perfectly. When I print on
one printer it comes out fine; on another printer it cuts off the bottom line
on some rows and cuts into the bottom line on many others. I assume this is
some kind of printer problem. Is there a way I can fix it for ANY printer? I
am going to have to send this workbook to someone else when it is finished
and I have no idea what that person's printer will do.

Any help is much appreciated. Thanks!

Stacy


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Printing wrapped text

Thanks Dave - that sub worked perfectly. (And it was definitely beyond my
prowess as a beginner with macros, so I really appreciate the help!)

Stacy

"Dave Peterson" wrote:

You'll have to adjust the range that contains those long strings. I used
A1:A9999.

Option Explicit
Sub testme02()

Dim myRng As Range
Dim myCell As Range
Dim myAddr As String
Dim wks As Worksheet
Dim iCtr As Long

Dim CalcMode As Long
Dim ViewMode As Long

Application.ScreenUpdating = False

CalcMode = Application.Calculation
Application.Calculation = xlCalculationManual

ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView

'what range contains those strings?
myAddr = "A1:A9999"

iCtr = 0
For Each wks In ActiveWorkbook.Worksheets
Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(wks.Range(myAddr), _
wks.Range(myAddr).Cells _
.SpecialCells(xlCellTypeConstants, xlTextValues))
On Error GoTo 0

If myRng Is Nothing Then
'do nothing on this sheet
Else
For Each myCell In myRng.Cells
iCtr = iCtr + 1
If iCtr Mod 50 = 0 Then
Application.StatusBar = "Processing: " _
& myCell.Address(external:=True)
End If

If Trim(myCell.Value) = "" Then
'skip it
Else
If Right(myCell.Value, 1) = vbLf Then
'already has one, so skip it
Else
myCell.Value = myCell.Value & vbLf
End If
End If
Next myCell
End If
Next wks

'put things back to what they were
Application.Calculation = CalcMode
ActiveWindow.View = ViewMode
Application.ScreenUpdating = True
Application.StatusBar = False

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

stacyjean622 wrote:

Dave,

I thought about doing that, but I don't know how to "automatically" add
alt-enter to all of these cells. As I mentioned, I will have a total of over
3,000 cells like this - all with different text. I definitely don't want to
have to manually add the alt-enter. I wasn't sure how to write a VBA code for
it or if there was a simpler way to add alt-enter to all of the cells.

Stacy

"Dave Peterson" wrote:

Maybe you could add an alt-enter as the last character in the cell.

You'll see an "extra" line on some printers, but at least the last line being
chopped won't matter.

stacyjean622 wrote:

I am having an issue printing text that is wrapped. It is NOT a merged cell;
the column has a fixed width; the cell has wrap text turned on and it is set
to auto fit. (This is important as I have a workbook with over 150
worksheets; each worksheet has 27 rows with text in this column and each row
in each sheet is different; some have several sentences and some have two
words. So I cannot take the time to manually adjust these rows.)

When I look at the text on my screen it shows up perfectly. When I print on
one printer it comes out fine; on another printer it cuts off the bottom line
on some rows and cuts into the bottom line on many others. I assume this is
some kind of printer problem. Is there a way I can fix it for ANY printer? I
am going to have to send this workbook to someone else when it is finished
and I have no idea what that person's printer will do.

Any help is much appreciated. Thanks!

Stacy

--

Dave Peterson


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrapped text is not visible, how do I fix this? Barbara Sage Excel Worksheet Functions 4 December 21st 06 06:30 PM
Wrapped text vicky Excel Discussion (Misc queries) 0 October 3rd 06 12:13 AM
wrapped text cell Magyvr Excel Discussion (Misc queries) 2 May 3rd 06 09:31 PM
Limit to Wrapped Text? Llobid Excel Discussion (Misc queries) 5 March 7th 06 04:08 AM
wrapped text does not display Erik Excel Discussion (Misc queries) 6 February 21st 06 10:06 PM


All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"