How do I call new Capitalize() function?

Ask how to do things or if a certain feature is available in the program.
Post Reply
User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

How do I call new Capitalize() function?

Post by pjj »

Some time ago I wrote a handy script for case switching; at least it's quite handy for me 8) Anyway, it has this line:

Code: Select all

Document.InsertText(Namecase(selection));
which works, but unlike Format > Change Case > Capitalize. I hoped the new function you just introduced will be a good replacement, but sadly

Code: Select all

Document.InsertText(Capitalize(selection));
gives an error "Too many parameters for method %s". How can I correct this? Can't I call Capitalize() the same way Namecase() is called?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 6091
Joined: 19 Jul 2006 14:29

Re: How do I call new Capitalize() function?

Post by Rickard Johansson »

Replace the whole line with:

Code: Select all

Document.Capitalize();

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: How do I call new Capitalize() function?

Post by pjj »

Works like a charm :-D Many thanks!
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Post Reply