Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-01-2019, 03:37 PM
Madbeggar Madbeggar is offline Text/Font Space Parameters Windows 10 Text/Font Space Parameters Office 2019
Novice
Text/Font Space Parameters
 
Join Date: Dec 2019
Posts: 1
Madbeggar is on a distinguished road
Default Text/Font Space Parameters

Please forgive my ignorance - first time poster.
If I type some text and then select that text, the text is highlighted by a gray selection "box". This is normal.


What determines the size and position of this box relative to the actual characters? I assume that the gray space is determined by some qualities of the font or line spacing, but I don't know how to control/modify it.


Here's the current application I'm working on that brings up this query: I wanted to print some labels to insert into the spine sleeve of a three-ring binder. I typed out the titles in big letters on standard letter-size paper (landscaped) with the intention to cut them out into the 1" or 1-1/2" widths as required for the binder width. It occurred to me to put the titles into a text box in order to restrain the dimensions appropriately, e.g., 1"X10", and I could also use the box as cut lines.





After typing a title (centered vertically and horizontally) into a text box, I selected it and increased the font size to the maximum that the box would hold. At some point the letters were forced out of center and their bottoms were disappearing out of the text box, despite there being plenty of room for the actual letters. It seems that whatever quality defines the selection box was bumping against the top of my text box and forcing the increasingly larger text down and out of it.



Someone, please school me on this subject.
Reply With Quote
  #2  
Old 12-01-2019, 05:27 PM
Guessed's Avatar
Guessed Guessed is offline Text/Font Space Parameters Windows 10 Text/Font Space Parameters Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I think exploring the selection highlight metrics is an exercise in futility.

Better to explore what is controlling the line spacing, paragraph spacing, table cell margins and table row height parameters, each of which could be a factor in what you are seeing. Table rows will normally grow in height to fit the text inside them but you can override that by setting a specific row height. If the line spacing is smaller than the font size then I would expect text to be cut off at the bottom.

If you want to post a sample doc, we can tell you exactly why your text is being cut off.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 12-02-2019, 01:23 AM
gmayor's Avatar
gmayor gmayor is offline Text/Font Space Parameters Windows 10 Text/Font Space Parameters Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I agree with Andrew that you should be using table cells rather than text boxes.
If you add a single column table to a blank document. Type your titles in the cells



and then run the following macro:

Code:
Option Explicit

Sub FitText()
'Graham Mayor - https://www.gmayor.com - Last updated - 02 Dec 2019
Dim oTable As Table
Dim oRng As Range
Dim oCell As Cell
    Set oTable = ActiveDocument.Tables(1)
    With oTable
        .Rows.Height = InchesToPoints(1)
        .TopPadding = InchesToPoints(0)
        .BottomPadding = InchesToPoints(0.25)
        .LeftPadding = InchesToPoints(0.08)
        .RightPadding = InchesToPoints(0.08)
        .Spacing = 0
        .AllowPageBreaks = True
        .AutoFitBehavior wdAutoFitFixed
        .AllowAutoFit = False
    End With
    For Each oCell In oTable.Range.Cells
        oCell.VerticalAlignment = wdCellAlignVerticalCenter
        oCell.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
        Set oRng = oCell.Range
        oRng.End = oRng.End - 1
        If Len(oRng) > 1 Then
            oRng.Font.Size = 72
            Do Until oRng.Characters.Last.Information(wdVerticalPositionRelativeToPage) = _
               oRng.Characters.First.Information(wdVerticalPositionRelativeToPage)
                oRng.Font.Size = oRng.Font.Size - 1
                DoEvents
            Loop
        End If
    Next oCell
lbl_Exit:
    Set oTable = Nothing
    Set oCell = Nothing
    Set oRng = Nothing
    Exit Sub
End Sub
and you should get ...

__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 12-02-2019, 07:02 AM
Charles Kenyon Charles Kenyon is online now Text/Font Space Parameters Windows 10 Text/Font Space Parameters Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Look into, also using an Avery label definition.

Mailings > Labels > Options




Creating a new document gives you a pre-defined table.
You could use the actual label stock if you want or simply cut the paper.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text/Font Space Parameters Insufficient memory or disk space. Word can not display the specified font. hanspeterhorne Word 1 09-28-2018 06:36 PM
Need to create document that will auto insert text based on parameters parisfranco Word 13 07-25-2017 03:21 PM
Text/Font Space Parameters Trendline parameters Gilles Excel 2 01-04-2017 08:02 AM
Text/Font Space Parameters Monospace font is not monospaced (continue white space) HoresXB Word 5 11-20-2014 04:24 AM
Text/Font Space Parameters Printer parameters stored where? Doc_man Office 2 06-20-2011 12:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft