Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-11-2014, 08:58 AM
ilcaa72 ilcaa72 is offline Increase Sentence Font at cursor position Windows 7 64bit Increase Sentence Font at cursor position Office 2010 64bit
Novice
Increase Sentence Font at cursor position
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase Sentence Font at cursor position Add multiple rows to Excel 2010 table at cursor position C J Squibb Excel Programming 12 11-07-2013 07:35 AM
Increase font in received messages Alonso Outlook 6 02-20-2012 10:04 PM
Displaying cursor position within cell MiamiTom Excel 0 11-18-2011 09:02 AM
Cursor size varies with font size r_lewis@fuse.net Word 0 07-20-2011 06:11 PM
Retrieve position of Cursor - x & y positions SDondeti PowerPoint 0 05-19-2011 11:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:31 PM.


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