Initial caps in Open Office Writer

By | August 9, 2009

openofficeYou might not be knowing that there is an excellent MS Office alternative exists called OpenOfficeOpenOffice is a free open-source office suite.  I have been using OpenOffice lately as I have been working on creating some PDFs.  The new OpenOffice 3.1 version is equipped with lot of features and it has been improving day by day.  Lot of excellent extensions making it fun to work on OpenOffice.  It has the features that are not available on MS Office like exporting the documents to PDF, presentations to flash files, spreadsheets to XML files, etc.  Also, you can import the MS Office documents directly into OpenOffice and save them in their original MS Office format.

OpenOffice is lacking one useful option in OpenOffice Writer (Word in MS Office), which is “initial caps”.  I don’t know why they are not including it, but it is the widely used option in my work.  As I started working with OpenOffice Writer, I have started getting trouble.  I had to manually do the initial capitalization.  So, I have searched the OpenOffice forums and web to lean how to get that functionality in OpenOffice writer.  So, this post combines those all tricks in one place and gives step-by-step information on how to get that functionality in Writer.

You can achieve this functionality by using macros and assigning it to a keyboard shortcut, which is Shift+F3 in MS Word.

Download the macro code first.  Then, open the OpenOffice Writer.  Go to Tools>Macros>Organize Macros> Basic

On the left side, you can see a folder “Standard.” Expand it and you can see Module1.  Select it and then click the button “Edit” on the right side.  It opens a code window.  Now select the code already there and delete.  Now paste the macro code you have downloaded from the above link.  If you want to rename this macro, then go to the bottom of the window and right click on the tab, which reads “Module1.”  Then, close the window.

Now your macro is ready.  You need to assign a key to it.  Click on “Tools” from the menu bar on the top and select “Customize.”  You can alternatively press Alt+T followed by C to open the customization window.  Select the tab “Keyboard.”  Below that in the “Shortcut Keys” section select a short key, normally it is Shift+F3 in Word by default.  Then in the “Category” section, expand Macros>User>Standard>Module1(if you have not renamed it earlier).  Then click the button “Modify” on the right side.  You are done!  Now you can initial capitalize the words same as you were doing in MS Word.

6 thoughts on “Initial caps in Open Office Writer

  1. John

    Tremendous! Thank you so much for that. That had been one of the few annoyances I’ve had with Open Office. And you made it very easy to create the macro. Kudos.

  2. Jaap

    thanks for capital macro, it works with me on alle words in a sentence, not only the first in the rule or sentence.

  3. Kent

    I downloaded this macro and found only Title case worked. It did not toggle through lower and upper case. Also it only worked on one word not on a selection of words. Looking at the code it appeared that these features had been deliberately disabled.

    I was able to change the code so that it worked. make the following changes to the code marked in bold:

    ChgCase: ‘Check case of seln and alter accordingly
    if seln=ucase(seln) then ‘seln is already UPPER – set to lower
    dispatcher.executeDispatch(document, “.uno:ChangeCaseToLower”, “”, 0, Array())
    goto FinishWord
    if seln=lcase(seln) then ‘seln is already lower – set to Title
    goto SetToTitle
    endif ‘seln is probably mixed case – set to UPPER
    dispatcher.executeDispatch(document, “.uno:ChangeCaseToUpper“, “”, 0, Array())
    goto FinishWord

    and add the label



Leave a Reply

Your email address will not be published. Required fields are marked *