Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-11-2017, 12:32 PM
dwirony dwirony is offline Underline Inserted Text Windows 7 64bit Underline Inserted Text Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Arrow

Ooops, I may have posted some crappy code before. If you're trying to just underline that word, maybe just the use find and replace to underline it? That should only underline that title:

Code:
With Selection.Find
        .Text = " Product Specifications"
        .Replacement.Text = " Product Specifications"
        .Replacement.Font.Underline = True
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
Hope this helps...
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing a comment with underline or other formatting (or adding that formatting to commented text) paulkaye Word 4 05-16-2016 05:38 AM
Underline Inserted Text Is there a way of having text automatically inserted based on the selection of other text? MiniMum97 Word 2 04-12-2016 06:09 AM
Copy Underline text from Word and Paste into excel rfaris Excel Programming 7 10-05-2015 05:56 AM
Underline Inserted Text Select text to be underline and bold ksigcajun Word VBA 1 03-16-2015 07:51 PM
How to remove the UNDERLINE from a hyperlink text? Learner7 PowerPoint 3 05-17-2010 09:35 PM

Other Forums: Access Forums

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