“In a perfect world everyone would write in standard English and
all publications would use a universal style guide. In the real
world, however, you have to deal with different versions of English
(British, American, Australian, etc.), and every publication has
its own set of writing guidelines. If you write for several
markets, things can get pretty complicated. But instead of wasting
time on language idiosyncrasies, you can let an OOoBasic macro do
the donkey work. Let’s create a macro that converts from British
English to US English. You can easily modify it later for other
text conversion purposes.“The building block of this macro is a ‘replacement’ object,
which has the properties necessary to perform the replacement
operation. If you define theoSearch
variable as such
an object, its ‘replacement’ properties will be
oSearch.SearchString
,
oSearch.ReplaceString
, and
oSearch.SearchWords
…”
Linux.com: OOoBasic Crash Course: Replacement Therapy
By
Dmitri Popov
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis