Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2016, 12:31 AM
gmayor's Avatar
gmayor gmayor is offline Getting bold Pargraph Windows 10 Getting bold Pargraph 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


It is not exactly clear what
Quote:
I want to get each next paragraph after any paragraph that is bolded.
means but if you want to get the next non-bold paragraph after a bold paragraph then:
Code:
Sub ShowPara()
Dim oPara As Paragraph, sText As String, oRng As Range
    For Each oPara In ActiveDocument.Paragraphs
        If oPara.Range.Bold = True Then
            If Not oPara.Range.End = ActiveDocument.Range.End Then
                Set oRng = oPara.Range.Next.Paragraphs(1).Range
                If oRng.Bold = False Then
                    sText = oRng.Text
                    oRng.Select
                    MsgBox sText
                End If
            End If
        End If
    Next oPara
lbl_Exit:
    Exit Sub
End Sub
__________________
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting bold Pargraph Adding bold colons at end of bold row headings bertietheblue Word Tables 2 07-26-2015 07:26 AM
Getting bold Pargraph Text in #1 is made bold, rest of the document is edited, text in #1 is now not bold footer-assistance Word 1 06-29-2015 03:49 AM
Making Bold Using 'IF' bigukfan Mail Merge 3 03-10-2014 02:11 PM
Getting bold Pargraph Not Bold text but it comes up bold Pluviophile Word 7 10-22-2013 10:29 AM
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:25 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