![]() |
|
|
|
#1
|
|||
|
|||
|
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
|
|
#2
|
|||
|
|||
|
Quote:
I thought of doing a find and replace, but I think it will be time-consuming. The report is dynamic, generated on the fly by a definition which drives it. It may insert 10 tables, each with it own unique table title. Each title must be underlined. I would like to underline each title at the time the title is inserted but before the table is inserted. Thoughts? Thanks, -John |
|
#3
|
|||
|
|||
|
I'm afraid I can't help you
, I'm still somewhat of a novice myself.Bump for a better answer- |
|
#4
|
||||
|
||||
|
Create or modify a paragraph style that has the characteristics you want, assign it to a keyboard shortcut (or use the ribbon) and apply it to the paragraph in question.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#5
|
|||
|
|||
|
Quote:
The code creates title text which I want underlined, followed below by some more text (not underlined) or a table. I am trying to underline (by code) the title text only, immediately after creating it or as it is created. Thanks, -John |
|
|
|
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 |
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 |
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 |