Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2017, 11:53 AM
iwonder iwonder is offline Capitalized words to smallcaps on user approval Windows 10 Capitalized words to smallcaps on user approval Office 2013
Novice
Capitalized words to smallcaps on user approval
 
Join Date: Jun 2017
Location: France
Posts: 10
iwonder is on a distinguished road
Default

Thanks Greg, but this asks for reformatting but dosen't show the selected word to reformat...
Something is missing i guess

Quote:
Originally Posted by gmaxey View Post
Code:
Sub ALLCAPS_TO_SMALLCAPS()
Application.ScreenUpdating = False
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "<[A-Z][A-Z]*>"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    While .Execute
      oRng.Select
      If MsgBox("Reformat?", vbQuestion + vbYesNo) = vbYes Then
        oRng.Case = wdTitleWord
        oRng.Font.SmallCaps = True
      End If
      oRng.Collapse wdCollapseEnd
    Wend
  End With
Application.ScreenUpdating = True
End Sub

Reply With Quote
Reply

Tags
allcaps smallcaps user



Similar Threads
Thread Thread Starter Forum Replies Last Post
Staged Approval - Fillable Form - Digital Signature Barters Word 0 06-03-2015 06:02 PM
Capitalized words to smallcaps on user approval How to keep a word with capitalized first letter, but not at the beginning of a sentence? xiangwulu Word 4 10-31-2014 09:00 AM
change non capitalized text to capitalized text antoniob Excel 8 10-13-2014 09:11 AM
Capitalized words to smallcaps on user approval weird smallcaps phenomenon franklekens Word 8 08-31-2014 12:35 AM
Is there a way to find CAPITALIZED words in a doc? Bobosmite Word 8 01-28-2014 03:53 PM

Other Forums: Access Forums

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