View Single Post
 
Old 12-07-2013, 11:28 AM
Marrick13 Marrick13 is offline Windows XP Office 2010 32bit
Competent Performer
 
Join Date: Jun 2006
Posts: 102
Marrick13 will become famous soon enough
Default True Title Case for First Row of All Tales

I found the solution to having the code select only the text in the first row of each table.
Add the following three lines right after the "Tbl.Rows(1).Range.Select" line:
Code:
Set sText = Selection.Cells(1).Range.Paragraphs(1).Range
sText.End = sText.Cells(1).Range.End - 1
sText.Select
The "sText.End = sText.Cells(1).Range.End - 1" line reduces the selection of the entire row to just the text in that row. Then the ".MoveEnd unit:=wdCharacter, Count:=-Len(sText) + 1" code in the True Title section works as though you manually selected the text in the first row.
Reply With Quote