![]() |
|
|
|
#1
|
|||
|
|||
|
Hello,
I have a loooong list of book/magazine titles--well over three or four thousand titles-- and I would need to find a way to italicize those titles. The listing is something like this: 46. First Magazine 1.8, April 1960 47. Second Magazine 36, April 1960 1144. First Book, September 1981 1145. Second Book, September 1981 I'm a complete beginner re. the use of wildcards. If I use the following wildcard, I'm able to get to the first letter of the book/magazine title, but I don't know how to select the full title, not just the first letter: [0-9]. [a-zA-Z] Titles are always preceded by a number, which is followed by a period, and then comes the magazine/book title, always followed by a comma or a number. The only variable which is unknown here is the length of the title. Is there any wildcard that would allow me to select the full title given there's always a comma or a number after the title? There's a lot of additional info in each entry, so I can't export this to Excel, where it should be fairly easy to do. Thanks!! |
|
#2
|
|||
|
|||
|
Try the following wildcard Find/Replace:
Find=[0-9]{1,}.*^13 Replace=^& with italic format |
|
#3
|
||||
|
||||
|
That formats everything, not just the titles.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#4
|
|||
|
|||
|
Quote:
For some reason, the comma in {1,} does not seem to be valid. If a remove that comma, the Find What text selects the complete line, not only the text. |
|
#5
|
||||
|
||||
|
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#6
|
|||
|
|||
|
Thanks, that did the trick indeed. But as you pointed out, that formats the complete line, not just the titles.
I tried your macro and it seems to work when the title has one word only; if there are two words, then that entry is skipped. Many books/magazines have several words in their titles. Is it possible to italicize all title words? |
|
#7
|
||||
|
||||
|
Quote:
46. First Magazine 1.8, April 1960 47. Second Magazine 36, April 1960 1144. First Book, September 1981 1145. Second Book, September 1981 Which is consistent with your description in post #1:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#8
|
||||
|
||||
|
You really need a macro for this:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[0-9].[ a-zA-Z]@[,0-9]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
End With
Do While .Find.Execute
i = i + 1
.Start = .Start + 3
.End = .End - 1
.Font.Italic = True
.Start = .Paragraphs.Last.Range.End
Loop
End With
Application.ScreenUpdating = True
MsgBox i & " titles formatted."
End Sub
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#9
|
|||
|
|||
|
That did work, thanks a lot!
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A macro to find interjections from a list and italicize them | FabioDD | Word VBA | 8 | 03-15-2022 06:28 AM |
Magazine-like templates in Word 2019?
|
dylansmith | Word | 2 | 05-11-2020 03:58 PM |
| How can I change the order of book pages of an existing book to left-to-right instead of right to le | Iris12 | Publisher | 0 | 02-06-2018 09:37 AM |
| Digital Magazine Publications! | epublisherWorld1 | Publisher | 0 | 08-28-2017 03:49 AM |
magazine column style
|
Nasser | Word | 4 | 04-21-2010 02:41 PM |