Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2021, 11:12 PM
yacov yacov is offline search paragraph Windows 10 search paragraph Office 2016
Competent Performer
search paragraph
 
Join Date: Oct 2019
Posts: 146
yacov is on a distinguished road
Default search paragraph

Hi,
I have a long document, in which each paragraph has the sign "="
I would like to find paragraphs that due to an error do not contain the sign =


Is it possible?
Thanks
Yacov
Reply With Quote
  #2  
Old 08-29-2021, 12:34 AM
gmayor's Avatar
gmayor gmayor is offline search paragraph Windows 10 search paragraph Office 2019
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

The following macro will highlight any paragraph without the '=' sign


Code:
Sub Macro1()
Dim oPara As Paragraph
    For Each oPara In ActiveDocument.Paragraphs
        If InStr(1, oPara.Range.Text, "=") = 0 Then
            oPara.Range.HighlightColorIndex = wdYellow
        End If
    Next oPara
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
  #3  
Old 08-29-2021, 12:45 AM
yacov yacov is offline search paragraph Windows 10 search paragraph Office 2016
Competent Performer
search paragraph
 
Join Date: Oct 2019
Posts: 146
yacov is on a distinguished road
Default

thanks a lot. works great
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection drrr Word VBA 2 08-24-2021 03:05 AM
Inserting text from a Userform into a Field in a paragraph in a paragraph in a word document storemaz Word VBA 1 03-13-2020 08:11 AM
search paragraph Macro to search for a particular word, copy the entire paragraph to a new document Productivity Word VBA 2 10-25-2019 06:40 AM
search paragraph Continuous Paragraph across two columns vs Parallel Column Paragraph Pinesh Word 2 03-09-2018 04:24 PM
search paragraph Cross-reference to paragraph not updating when paragraph moves windhoek2010 Word 1 09-15-2017 08:30 PM

Other Forums: Access Forums

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