![]() |
|
#1
|
|||
|
|||
|
hi there
I have around 60 pages in word, there is some tables and some characters in each table, I must change their size to 13 but when I make them bigger the characters will enter to the next line, I want them to fill the free spaces while changing the size and stay in their line. I attach one of my pages, change them to 12-13 and watch what happening! PLEASE, PLEASE give me the best solution while I'm not professional in Microsoft word ![]() many thanks |
|
#2
|
|||
|
|||
|
If you change the font size then yes the text MUST move onto the next line because it can not fit staying on the same line. The alternative is to change the size of the cell; making it bigger and its neighbours smaller. Is this what you want to do?
|
|
#3
|
||||
|
||||
|
Fitting the text in the same space when increasing the point size from 8 to 13 isn't possible. However, if you're prepared to change the cell sizes, it's quite possible to avoid the text wrapping. The following macro will re-format all the tables in your document:
Code:
Sub FormatTables()
' Turn Off Screen Updating
Application.ScreenUpdating = False
Dim SBar As Boolean, i As Long, j As Long, TblCell As Cell
' Store current Status Bar status, then switch on
SBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
With ActiveDocument
j = .Tables.Count
'Process all tables
For i = 1 To .Tables.Count
StatusBar = "Processing table: " & i & " of " & j
With .Tables(i)
'Set Autofit
.AllowAutoFit = False
'Turn off text wrapping in cells
For Each TblCell In .Range.Cells
TblCell.WordWrap = False
Next
'Reduce the cell left/right padding
.LeftPadding = 2.5
.RightPadding = 2.5
'Set the font point size
.Range.Font.Size = 13
'Clear preferred dimensions
.PreferredWidthType = wdPreferredWidthAuto
.Columns.PreferredWidthType = wdPreferredWidthAuto
'Set Autofit
.AllowAutoFit = True
End With
DoEvents
Next
End With
' Clear the Status Bar
Application.StatusBar = ""
' Restore original Status Bar status
Application.DisplayStatusBar = SBar
' Turn On Screen Updating
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#4
|
|||
|
|||
|
many many thanks for helps.
if I want to be clear to say exactly what I'm looking for, I could share with you this attached files. this is one of my pages that completely re layout in Photoshop and playing with text tools in photoshop to change the characters spacing and sort the texts in lines but the size is "13". My "WISH" is that I could change the word file (attached in first post) to something like Jpg file (attached here) with 13 font size Please help me if this is on your word skills ! many thanks Last edited by mohsen123; 05-06-2014 at 12:06 AM. |
|
#5
|
||||
|
||||
|
Try:
Code:
Sub FormatTables()
' Turn Off Screen Updating
Application.ScreenUpdating = False
Dim SBar As Boolean, Rng As Range, i As Long, j As Long, TblCell As Cell
' Store current Status Bar status, then switch on
SBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
With ActiveDocument
j = .Tables.Count
' Process all tables
For i = .Tables.Count To 1 Step -1
StatusBar = "Processing table: " & j - i + 1 & " of " & j
With .Tables(i)
With .Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = False
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
.Text = "([! ])[ ]@([! ])"
.Replacement.Text = "\1^t\2"
.Execute Replace:=wdReplaceAll
.Text = "[ ]@([! ])"
.Replacement.Text = "\1"
.Execute Replace:=wdReplaceAll
End With
Set Rng = .Range
.ConvertToText Separator:=vbTab
End With
Rng.ConvertToTable Separator:=vbTab
With .Tables(i)
' Set Autofit
.AllowAutoFit = False
' Turn off text wrapping in cells
For Each TblCell In .Range.Cells
TblCell.WordWrap = False
Next
' Reduce the cell left/right padding
.LeftPadding = 2.5
.RightPadding = 2.5
With .Range
' Set the font point size
.Font.Size = 13
' Set the space before/after
With .ParagraphFormat
.SpaceBefore = 0
.SpaceAfter = 0
.Alignment = wdAlignParagraphCenter
End With
End With
' Clear preferred dimensions
.PreferredWidthType = wdPreferredWidthAuto
.Columns.PreferredWidthType = wdPreferredWidthAuto
' Set Autofit
.AllowAutoFit = True
End With
DoEvents
Next
End With
' Clear the Status Bar
Application.StatusBar = ""
' Restore original Status Bar status
Application.DisplayStatusBar = SBar
' Turn On Screen Updating
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Pivot table grouping problem 2 tables need different grouping
|
differentdrummer | Excel | 3 | 12-10-2013 01:19 AM |
Problem with page breaks and excel tables
|
stu_uk | Word | 1 | 12-11-2012 02:50 PM |
Problem with Tables and Templates
|
Luxanais | Word Tables | 1 | 09-06-2011 03:42 AM |
Problem with Tables and Templates
|
Luxanais | Word | 1 | 09-04-2011 06:17 AM |
Problem with joinign tables and viewing them on a mobile device
|
alphabravo | Word Tables | 2 | 03-23-2011 09:32 AM |