View Single Post
 
Old 02-11-2014, 08:58 AM
ilcaa72 ilcaa72 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2014
Posts: 27
ilcaa72 is on a distinguished road
Default Increase Sentence Font at cursor position

Hello,

i wanted to increase the size of the font of the current sentence at the cursor position. So if normal font is 10, the sentence would increase to say 24 and if i moved off that sentence it would adjust back to the normal font size, and the new line at the cursor would increase to 24 font.

i have a loop that places each sentence in its own line, but cant figure out how to reference the current line based on the current cursor position to increase the font.

this places each sentence on a new line.
Code:
Sub Parser()
Dim para As Paragraph
Dim sents As Sentences
Dim sent As Range


    Set paras = ActiveDocument.Paragraphs
    For Each para In paras
        
        count_Sentences = para.Range.Sentences.Count
        If count_Sentences > 1 Then
        Set sents = para.Range.Sentences
       
 For Each sent In sents
            sent.InsertAfter Chr(11)
               
 Next
End If
    Next
End Sub
Reply With Quote