In the long run it may be easier to just experiment with different font sizes for information in the cell until you find the right size for your needs. The only difficulty with this macro, of course, is that it isn't "automatic." For instance, it won't adjust the size of a text string to the maximum size possible to fit within a cell. " points, or " & PointsToInches(sngLength) & " inches." MsgBox "Your string has a length of " & sngLength & _ SngEndPos = Selection.Information(wdHorizontalPositionRelativeToPage) SngInitPos = Selection.Information(wdHorizontalPositionRelativeToPage) StrText = InputBox("Enter the string whose length you want to determine") For instance, the following VBA macro displays an input box so you can input your string, displays the Font dialog box so you can specify font and point size, and then displays the width of the resulting string. You can, however, create a macro that may help you by displaying the width of a text string in points or inches. Word doesn't provide any properties you can check to determine the width of various characters, each of which could be different sizes and have other attributes. If you are using Word 97, there is no inherent way to accomplish the task. To resize a line, select the line with a double click and then drag any of the resizing points to change the length or width. Word decreases the width of the text by "scrunching" (a highly technical term) the text together horizontally, without adjusting it vertically. What Word does is to decrease the apparent size of the text so that everything fits. Click on OK to close the Table Properties dialog box.Click on OK to close the Cell Options dialog box. Make sure the Fit Text check box is selected.Word displays the Cell Options dialog box. The Cell tab of the Table Properties dialog box. The Table Properties dialog box is displayed. Choose Table Properties from the Table menu.Select the cell or cells that you want to format.If you are using Word 2000, Word 2002, or Word 2003 there is a built-in option that may do the trick. Now your whole design is thrown off! You long for a way to automatically adjust the size of the text in a cell so you won't have the wrapping and pushing occur. The result is that the text in a cell wraps and pushes everything else down a bit. Then, along comes a need to add a bit more text into one of the tables. In Microsoft Word 20, go to 'Print,' 'Print Preview' and then 'Shrink to Fit' under the 'Preview' option. 'Shrink to Fit' changes the font size and margins to make the document fit on one page. You have worked long and hard on your page design, including a couple of tables that are just right. Go to 'Print Preview' and use the 'Shrink to Fit' option in Word if you don't want to make the changes manually.
0 Comments
Leave a Reply. |