View Single Post
 
Old 09-28-2020, 12:35 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 ofgmayor has much to be proud of
Default

What constitutes a 'line' in the document? There are no 'lines' in a Word document. Formatting is by text flow between the current margins. If the 'lines' are merely an artefact of text flow then capitalising the first Word on each displayed line is likely to reflow the document as Capitals can take up more space then the lower case letters they replace.
If the 'lines' are actually paragraphs then the matter is rather more straightforward.
Code:
Dim oPara As Paragraph
    For Each oPara In ActiveDocument.Paragraphs
        oPara.Range.Characters(1).Case = wdUpperCase
    Next oPara
    Set oPara = Nothing
__________________
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