Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-28-2015, 01:41 PM
gmaxey gmaxey is offline I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? Windows 7 32bit I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oPar As Paragraph
  For Each oPar In ActiveDocument.Paragraphs
    If Not oPar.Range.Information(wdWithInTable) Then
      If oPar.Range.Shading.BackgroundPatternColor <> wdColorAutomatic Then
        oPar.Range.Shading.BackgroundPatternColor = wdColorAutomatic
        oPar.Range.HighlightColorIndex = wdYellow
     End If
    End If
  Next oPar
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? Macro to convert text to endnote? Orifacious Word VBA 27 03-29-2022 02:58 PM
Hide all text in shaded table cells ugcheleuce Word VBA 3 03-04-2015 10:28 PM
I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? How to make a style with shaded background and indented text? Katarina Word 4 03-25-2014 01:12 AM
I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? Formatting- Apply changes to highlighted text results in same change to other text sential Word 6 01-10-2014 03:22 PM
Macro to mark non-coloured/non-highlighted text as hidden PeterB Word 0 10-28-2009 07:54 AM

Other Forums: Access Forums

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