![]() |
|
|
|
#1
|
|||
|
|||
|
Thank you, Gmaxey! That was a typo, I meant Words(1). That code was part of the larger set here below. It works, but perhaps it can be made more efficient? Thanks a lot!
Code:
Sub ChrSixBis()
With ActiveDocument
If .Paragraphs(5).Range.Words(1) = "title" And .Paragraphs(5).Range.Characters(6) = "." _
Or .Paragraphs(5).Range.Words(1) = "Title" And .Paragraphs(5).Range.Characters(6) = "." _
Or .Paragraphs(5).Range.Words(1) = "TITLE" And .Paragraphs(5).Range.Characters(6) = "." Then
.Paragraphs(5).Range.Style = "myStyle"
.Paragraphs(5).Range.Words(1).Case = wdLowerCase
.Paragraphs(5).Range.Words(1).Font.SmallCaps = True
Else
MsgBox "Not Found"
End If
End With
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing font for a specific character | wagicz | PowerPoint | 1 | 03-16-2021 03:13 PM |
| Add paragraph return between two specific character | jeffreybrown | Word | 2 | 03-30-2017 02:45 PM |
Extract Line of Text w/ specific characters up to the paragraph character, send to Excel
|
dmarie123 | Word VBA | 10 | 07-20-2015 12:16 AM |
Macro to Insert text into the beginning on specific paragraphs unless the paragraph is blank
|
caboy | Word VBA | 2 | 04-01-2015 07:00 AM |
How can select from a specific character to another character
|
mohsen.amiri | Word | 2 | 02-19-2015 11:38 PM |