Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-31-2014, 02:54 PM
macropod's Avatar
macropod macropod is offline How to parse bold sections of a paragraph? Windows 7 32bit How to parse bold sections of a paragraph? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For a different way of approaching the problem, try something along the lines of:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim StrOut As String
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .Font.Bold = True
    .MatchWildcards = False
    .Execute
  End With
  Do While .Find.Found
    StrOut = StrOut & vbCr & .Text
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
While InStr(StrOut, vbCr & vbCr) > 0
  StrOut = Replace(StrOut, vbCr & vbCr, vbCr)
Wend
Application.ScreenUpdating = True
MsgBox "The document contains the following bold text:" & StrOut
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to parse bold sections of a paragraph? 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
How to parse bold sections of a paragraph? Set paragraph text to bold. Sorcerer13 Word 1 09-04-2012 11:08 AM
Export Outlook emails to Access & parse certain text elements smahale Outlook 0 01-18-2012 09:30 PM
parse, store and email a .tmp file from wordpad? scadaman29325 Office 0 09-28-2010 04:56 PM

Other Forums: Access Forums

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