Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 03-24-2024, 09:46 PM
Guessed's Avatar
Guessed Guessed is offline Format Paragraphs Only if It Contains Mixed Text Formatting VBA Windows 10 Format Paragraphs Only if It Contains Mixed Text Formatting VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

In that case you need to examine every paragraph with a loop
Code:
Sub WipeLocalFormats()
  Dim aPara As Paragraph
  For Each aPara In ActiveDocument.Paragraphs
    With aPara.Range.Font
      If .Bold = wdUndefined Or .Italic = wdUndefined Then .Reset
    End With
  Next aPara
End Sub
This assumes the underlying paragraph style on the 'mixed' paragraphs is non-bold and non-italic.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Format paragraphs between Start and End RobiNew Word VBA 2 11-13-2023 10:51 AM
how to use word vba to read header, mixed with text and shape, on last page of very section? oyster Word VBA 0 06-28-2022 08:58 PM
Format Paragraphs Only if It Contains Mixed Text Formatting VBA How to duplicate paragraphs & format them effimera Word VBA 2 12-20-2021 04:40 AM
Format Paragraphs Only if It Contains Mixed Text Formatting VBA trouble replacing mixed hidden and nonhidden text w0lfshad3 Word 1 05-01-2016 02:23 PM
Format Paragraphs Only if It Contains Mixed Text Formatting VBA Find and replace with mixed formatting pogonoforysci1 Word 2 09-26-2012 09:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:01 AM.


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