From: Compass Rose on 21 Jan 2010 18:07 Using Word 2007 Is it possible to include the changing of font case to Capitalize Each Word in a paragraph style? I would like the text to appear as: This Text Is In 'Capitalize Each Word' Case I would also like to avoid the use of Shift+F3, if I can. TIA David
From: Doug Robbins - Word MVP on 21 Jan 2010 18:42 Word only has "paragraph" and "character" styles. There is no "word" style, which is what you would need to achieve what you are after. The following code will capitalize each word of the selected text: Selection.Range.Case = wdTitleWord -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "Compass Rose" <CompassRose(a)discussions.microsoft.com> wrote in message news:D16472BE-49C7-4202-9329-61F29E6E30C7(a)microsoft.com... > Using Word 2007 > > Is it possible to include the changing of font case to Capitalize Each > Word > in a paragraph style? I would like the text to appear as: > > This Text Is In 'Capitalize Each Word' Case > > I would also like to avoid the use of Shift+F3, if I can. > > TIA > David
From: Fumei2 via OfficeKB.com on 22 Jan 2010 16:15 As Doug points out, you can not do this with a property of a Style itself. However, if you have an explicit Style that you want to end up having Title case, you could apply that Style and then use: Sub ChangeTitlecase() Dim r As Range Set r = ActiveDocument.Range With r.Find .Style = "MyTitleCase" Do While .Execute(Forward:=True) = True r.Case = wdTitleWord Loop End With End Sub Assuming the Style is named MyTitleCase, the above goes through the document changing all .Found instances of MyTitleCase to have in fact Titlecase. Doug Robbins - Word MVP wrote: >Word only has "paragraph" and "character" styles. There is no "word" style, >which is what you would need to achieve what you are after. > >The following code will capitalize each word of the selected text: > >Selection.Range.Case = wdTitleWord > >> Using Word 2007 >> >[quoted text clipped - 8 lines] >> TIA >> David -- Message posted via http://www.officekb.com
|
Pages: 1 Prev: How do I capture user's login data in a form Next: Uh Oh! |