Posted: Sun Oct 19, 2008 11:43 am Post subject: Button to change text cases?
Friends --
In MS Word there was a way to highlight text, click a button on the toolbar, and change the text from lower-case to upper-case or vice versa. I can't find that in Neo Office. Does it exist?
It doesn't exist in a toolbar button, but the feature does exist. To change text to title case, use the following steps:
1. Select the text that you want to change to title case
2. Select the Format :: Character menu and in the dialog that appears, click on the Font Effects tab
3. Change the dialog's Effects option to Title and press the OK button.
There is a more direct way than that for lower/uppercase - after selecting your text, go to Format::Change Case and that gives you the option of upper or lower case, with (sometimes) keyboard shortcuts assigned to do that. If they aren't the shorcut key combos you prefer (I like cmd-shift-L and cmd-shift-U) you can set those in Tools::Customise in the Keyboard tab - the functions you want are in the Format category, and their Function names are Lowercase and Uppercase.
I prefer keyboard shortcuts myself, but you could just as easily assign those functions to buttons on your chosen buttonbar if you wanted.
- padmavyuha
*edit* to set to Title Case (as Patrick was describing) where the first character of each word is capitalised, you could put the following macro into NeoOffice Basic and assign it to a keystroke or button:
Code:
sub titleCase
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "CaseMap"
args1(0).Value = 3
dispatcher.executeDispatch(document, ".uno:CaseMap", "", 0, args1())
end sub
I just used the macro recorder to do what Patrick suggested above (there's no direct access to Title Case through Customise as there is with LC/UC).
I am looking for the same solution -change Lower Case to Proper Case, in spreadsheets.
So, I created a Macro using yoxi's of 19 Oct 2008. Applied it to a column of data in my spread sheet, and nothing changed. No error message either.
Any further clues please Yoxi?
Joined: Mar 15, 2007 Posts: 43 Location: Wisconsin US
Posted: Sun Dec 07, 2008 4:19 pm Post subject:
macman39 wrote:
I am looking for the same solution -change Lower Case to Proper Case, in spreadsheets.
So, I created a Macro using yoxi's of 19 Oct 2008. Applied it to a column of data in my spread sheet, and nothing changed. No error message either.
Any further clues please Yoxi?
Eric
You can't just copy Yoxi's - He is simulating selecting something from a menu in Writer. The option doesn't exist in the spreadsheet. There already is a "proper" function in the spreadsheet, so if you put into A2 the line:
=proper(A1)
you will get the text of cell A1 with all initial letters upper and the rest lower. You can make a macro out of this if you wish copying over the original, but I don't really see any reason.
The upper and lower suggestions work the same way in the spreadsheet as writer, but they also have built in functions.
Hi, Markk.
I made a test spreadsheet, and followed your instructions, and it worked fine.
Then today, having tried to do a demo to someone else, it does not work. All goes as expected, but when I get to the last step to delete the unwanted column, it goes wrong. Here is my working:
Spreadsheet, with data as follows:- original lower case data is in col G.
make blank column,H.
format H cells as text,
put =proper(G1) into first cell (H1). Hit enter, it inserts required content as proper case.
highlight this cell and drag down the column H.
Let go mouse, and the column is filled with text from col G, as proper case.
then, click on column label G to highlight all col G.
use EDIT/DELETE CELLS and col G goes, H label changes to G but contains the test "(hash)REF!" as if it never contained real data, but just the link to the cell I had deleted.
Same happens if I do EDIT/DELETE CONTENTS on G col.
I did an update of NeoOffice to 2.2.5 Patch4 in between the original test, and today's one.
Is this change the cause of the problem? Or am I doing the delete wrongly. Help please.
Eric
Please try the following steps after pasting into column H which fills H cells with the proper case text.
- Highlight column H
- Select the menu Edit :: Copy
- Place cursor in G1
- Select the menu Edit :: Paste Special
- In the popup menu, uncheck Paste All in the Selection section, then uncheck everything except for Strings
- Click the OK button, you may get a warning about pasting into cells that already have data, click Yes
- Cells in column G should fill with the text with first letters of words capitalized
- Delete column H
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum