Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2019, 07:12 AM
gmaxey gmaxey is offline graying out text from /* to */ Windows 10 graying out text from /* to */ Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default


Code:
Sub Demo()
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .ClearFormatting
    .Text = "/\*{1}*/\*{1}"
    .MatchWildcards = True
    While .Execute
      oRng.Start = oRng.Start + 2
       oRng.End = oRng.End - 2
      oRng.Style = ActiveDocument.Styles("Strong") 'replace with your style
      oRng.End = oRng.End + 2
      oRng.Collapse wdCollapseEnd
     Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #2  
Old 08-04-2019, 10:59 AM
ronnaldo ronnaldo is offline graying out text from /* to */ Windows 7 64bit graying out text from /* to */ Office 2010
Novice
graying out text from /* to */
 
Join Date: Aug 2019
Posts: 4
ronnaldo is on a distinguished road
Default

thank you to all
i will try everything tomorrow
KRs
ron
Reply With Quote
  #3  
Old 08-05-2019, 12:27 AM
ronnaldo ronnaldo is offline graying out text from /* to */ Windows 7 64bit graying out text from /* to */ Office 2010
Novice
graying out text from /* to */
 
Join Date: Aug 2019
Posts: 4
ronnaldo is on a distinguished road
Default

it works !
brill !!!
thanks guys
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
graying out text from /* to */ Text Field [content control] - Default text color vs Filled Text color jackcoletti Word 3 02-01-2017 08:10 AM
graying out text from /* to */ Drawing lines between text boxes which have actual text within the text boxes RHODIUM Word 6 10-01-2016 04:43 PM
Compare text from Bookmark with text from Text box Byron Polk Word VBA 4 07-30-2014 06:18 AM
Ink tools graying out randomly andyjames PowerPoint 1 01-09-2013 12:54 AM

Other Forums: Access Forums

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