none
How to capitalize the first letter of the word automatically in the heading section of a word document ? RRS feed

  • Question

  • Hi,

    I need help regarding how to change the first letter of a word in the document section.  i know we can press shift+f3 or we can use "capitalize first letter of the word" option, but it has to be done manually every time when you add a word to the heading.

    what i want is when you add a word to the current heading it should change automatically like the previous words in the heading section. by everything i mean the font style too not just colour size and underline.

    Ex : 5.1 Heading Document (assume that i used shift+f3 to make "D" caps in the word 'Document")

    Now im adding another word to the heading... 5.1 Heading Document one 

    Here you can see the letter 'o' in  word "one" is not appearing in caps by default i have to change it manually. i want it to change in caps automatically after finished typing my word

    Ex: it should appear as "5.1 Heading Document One" without having to do anything separately to capitalize the newly added word 

    can someone please help me to find a way to automatically capitalize the first letter of the word ?

    Thanks in advance.

     
    Saturday, February 6, 2016 7:58 AM

All replies

  • If your heading Styles are properly defined, any text you type into them (or paste into them as unformatted text) will automatically adopt the correct font attributes. There is no facility in Word for the auto-capitalisation of heading text, however.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Saturday, February 6, 2016 8:51 AM
  • Thanks for your answer. But the formatting dosent works. There is no proper way to create a style in such a way that first letter of the second word is in caps. when we use format painter it reads only the style not the manual changes we made to the document.

    for example :  lets consider document heading => "5.1 Super Man" 

    here i changed the letter "M" in the word "Man"as capital letter manually.
    Now i highlighted 5.1 heading and clicked format painter . now im using it one the next heading (5.2 spider man).

    it changes in to "5.2 Spider man" not as "5.2 Spider Man" . 


     
    Sunday, February 7, 2016 11:06 AM
  • Capitalization is not something you can define in a Style - and I didn't say you could. Indeed, I even went so far as to say:
    There is no facility in Word for the auto-capitalisation of heading text.
    Your use of format painter is nonsensical and I didn't suggest that, either. What I referred to was pasting:
    as unformatted text.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Sunday, February 7, 2016 11:41 AM
  • Hi Mohan,

    There isn’t the event to capture the change event of document content, you may have a button with macro to achieve that.

    To capitalize the first letter of the words, we could use StrConv method with vbProperCase parameter.

    Dim s As String
     s = "5.1 heading document one"
     s = StrConv(s, vbProperCase)
     Debug.Print s

    For headers, we could use HeadersFooters object.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, February 9, 2016 3:35 AM
    Moderator
  • Starain,

    vbProperCase converts the first letter of every word in string to uppercase and does nothing that can't be done via Shift-F3 - which the OP is already using. Furthermore, vbProperCase is not the same as a true Title case, the particulars of which are language-dependent.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Tuesday, February 9, 2016 5:39 AM