|  11-30-2008, 04:18 AM | #1 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | 
				
				Spelling Macro
			 
			
			I am currently trying to write a macro to convert US spelling to UK I have something like this - Code: Sub Spelling()
'
' Spelling Macro
' Macro recorded 29/11/2008 by Simon Argent
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "color"
        .Replacement.Text = "colour"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "flavor"
        .Replacement.Text = "flavour"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAllMany thanks, | 
|   |   | 
|  11-30-2008, 04:34 AM | #2 | 
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | 
			
			I admire your technical prowess, but I have to question the actual thing you're trying to do. Books are written in either British or American English - they are distinct "variants" of the language. I just don't see the point of trying to "convert" an American English book to use British English spellings - it will still use American English grammatical constructs, and it will be obvious to the reader that it was written by an American author. What's the point? | 
|   |   | 
|  11-30-2008, 09:54 AM | #3 | |
| Literacy = Understanding            Posts: 4,833 Karma: 59674358 Join Date: Dec 2007 Location: The World of Books Device: Nook, Nook Tablet | Quote: 
 I don't know how often you need to do this (or want to do this), but if you have a great need to do this and to do so on a frequent basis, you might want to invest in my set of macros called EditTools. One of the modules included in the macro is called Language Conversion, which is described here. This module will work for converting any language to another language. I use it regularly to convert from non-U.S. spelling to U.S. spelling in the medical books I edit. | |
|   |   | 
|  12-01-2008, 05:12 AM | #4 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | 
			
			I find a lot of the words really annoying. Color, honor, valor, alunium etc. Most words don't bother me too much, just some of the more obvious spelling differences - plus if I can sweep through with a macro, it makes the spell check later on so much easier. I'll stick to the macro I have and add any words as I come across them. Repeats will be unlikely as once a word has been changed, the spell check won't pick it up meaning I won't add it into the macro again. I can stop it becoming too bloated by only sticking to specific words and living with the rest. Thanks, | 
|   |   | 
|  12-01-2008, 12:43 PM | #5 | 
| Grand Sorcerer            Posts: 11,470 Karma: 13095790 Join Date: Aug 2007 Location: Grass Valley, CA Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 | 
			
			One method would be to use a specific British dictionary which would identify American spelling as incorrect. I never heard of alunium in an American spelling. Dale | 
|   |   | 
|  12-01-2008, 01:30 PM | #6 | |
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | Quote: 
 I wanted the macro to speed things up - for some reason in Word, change all never does... The macro as is seems to be doing it's job - I rarely have to add any new words now - I just wanted to know if there was a more efficient way of writting the macro. Obviously not... | |
|   |   | 
|  12-01-2008, 01:39 PM | #7 | |
| Wizard            Posts: 3,671 Karma: 12205348 Join Date: Mar 2008 Device: Galaxy S, Nook w/CM7 | Quote: 
 A better way would be to do a while loop with a case statment inside Code: PSUDO CODE Match = "color|honor|etc..." Look for match While (Match not found) All the source examples you need are found in the tool BookCreator except for the case statement but a google on "vba select case example" should give you a good example on how to write one. =X= Last edited by =X=; 12-01-2008 at 01:41 PM. Reason: close select statment | |
|   |   | 
|  12-01-2008, 02:08 PM | #8 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | 
			
			Many thanks for this =X= And while I'm at it, thank you for the eBookCreator macros. It was using this that encouraged me to create one for spellings. I have done a search but for some reason I only get porn results???? http://www.google.co.uk/search?sourc...ase+example%22 Will keep hunting | 
|   |   | 
|  12-10-2008, 08:36 AM | #9 | 
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			It just seems silly to me to replace words in this way. If it has color or colour is up to the author. For example, I am reading the Discword series. Terry Pratchett is clearly from the UK. If I went and replaced all colour to color, it would not change the fact. It's obvious fromt he way he writes. I would find it annoying to read UK spellings of some words and then to have cearly American words. Just let the author be American if the author is American.
		 | 
|   |   | 
|  12-10-2008, 08:40 AM | #10 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | 
			
			Some spellings don't bother me others really do... centred (UK) centreed (US) That is really annoying... Aluminum (US) Aluminium (UK) again, another one which annoys me! There are more specifics, but I'm not going to list everything, I am sur eyou get this gist! And again, with the ability to do so, isn't it MY choice as to whether I read american spelling or UK English? Last edited by PieOPah; 12-10-2008 at 09:13 AM. | 
|   |   | 
|  12-10-2008, 08:58 AM | #11 | 
| Reader            Posts: 11,504 Karma: 8720163 Join Date: May 2007 Location: South Wales, UK Device: Sony PRS-500, PRS-505, Asus EEEpc 4G | 
			
			Actually, the UK spelling of those words are "centred" and "aluminium".
		 | 
|   |   | 
|  12-10-2008, 09:13 AM | #12 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 | 
			
			Thank you. Typo on centred and got the UK/US wrong way round for Aluminium. I am ill today so will forgive myself those mistakes   Corrected now BTW | 
|   |   | 
|  12-10-2008, 09:14 AM | #13 | 
| Reader            Posts: 11,504 Karma: 8720163 Join Date: May 2007 Location: South Wales, UK Device: Sony PRS-500, PRS-505, Asus EEEpc 4G | 
			
			I hope that you feel better soon, PieOPah.
		 | 
|   |   | 
|  12-10-2008, 09:16 AM | #14 | 
| Addict         Posts: 398 Karma: 914 Join Date: Oct 2008 Location: UK Device: Sony PRS-505 |  Thank you | 
|   |   | 
|  12-10-2008, 10:18 AM | #15 | 
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			The American way of spelling centered is centered. Yes, it is your choice. But the won't the feel of the book maybe be changed? We already had Harry Potter being changed for the US market and I think that was a really bad idea. What is it about American spelling that bugs you so much? Last edited by JSWolf; 12-10-2008 at 10:21 AM. | 
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| How do Americans feel about UK spelling? | Luke King | Writers' Corner | 363 | 12-03-2010 12:07 PM | 
| Unutterably Silly When Automatic Spelling Correction Goes Wrong | RickyMaveety | Lounge | 11 | 10-01-2010 09:40 AM | 
| Seriously thoughtful Spelling contractions | SameOldStory | Lounge | 47 | 09-08-2010 09:08 PM | 
| Word Formatting Macro (Stingo's Macro) | Stingo | Sony Reader | 75 | 08-24-2010 05:18 AM |