Word 2007 question

Narnia

Prince
Joined
Nov 19, 2009
Messages
513
I know how to create a macro in Office that will automatically change the language to Spanish. I also know how to create another macro that will change the language to English. How do I create one macro that will toggle between the two languages so if the language is set to Spanish, it will change to English and visa versa? I need it to work for Word, PowerPoint, Excel, Outlook, and Publisher. I have Office 2007.
PS: Will this process also work for office 2003 and office 2010?
 
You can do this with a simple "if" statement:

Code:
Sub Macro1()
if Selection.LanguageID = wdSpanishModernSort then
    Selection.LanguageID = wdEnglishNewZealand
else
    Selection.LanguageID = wdSpanishModernSort 
end if
End Sub

This will actually toggle any language to spanish, then start toggling english / spanish / english etc.
 
Top Bottom