|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Need a Macro to Change Every Instance of Small Caps to All Caps and Reduce the Font by 2 Points
I have many documents that use small caps. Looks great, but when converted to Kindle they are changed to small caps, which then looks ugly. The original editor did not capitalize the words needed. Even though they are all small caps, if the word was capitalized then they would appear like that when reduced to small caps. i.e. the large cap would remain.
So how would I go about creating a Macro that changed every instance of Small Caps in a document to All Caps while dropping each selection by two font sizes (so they appear relatively the same size as when they were small caps)? |
#2
|
||||
|
||||
Try:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Format = True .Font.SmallCaps = True .Replacement.Font.AllCaps = True .Replacement.Font.SmallCaps = False .Forward = True .Wrap = wdFindStop .MatchWildcards = True .Text = "[A-Z]" .Replacement.Text = "^&" .Execute Replace:=wdReplaceAll .MatchWildcards = False .Text = "" .Replacement.Text = "" For i = 12 To 36 .Font.Size = i / 2 .Replacement.Font.Size = i / 2 - 2 .Execute Replace:=wdReplaceAll Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
That's great! Will save me so much time. Thank you.
|
Tags |
large caps, macros, small caps |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find CAPITALIZED names and change them into small caps | dylan.ve | Word VBA | 5 | 02-25-2016 03:15 PM |
Include small caps in hierarchical multi-level list | Hardbottle | Word | 1 | 06-20-2015 05:12 AM |
Using conditional formatining to change to all caps | Shades | Excel | 3 | 05-05-2014 06:05 AM |
small caps auto check | gene | Word | 1 | 12-03-2011 03:04 PM |
French accents in small caps | nuitsdete | Word | 0 | 09-23-2011 01:53 AM |