How can I disable AutoFormat and AutoCorrect using VBA in Word XP and 2000? I can disable it and re-enable it in just XP or just 2000, but not both. My problem is this - I am building an application in Word that will be used in both Word 2000 and Word XP (versions 9 and 10). There are 4 extra attributes in the AutoFormat (AF) dialog box in XP than there are in 2000. I have written a script that saves the settings for each AF attribute in an Array before my script disables all of them. Then during the close routine I call a sub that reads the array and sets everything back to the way it was when I launched the program. Because of the 4 extra attributes in XP, Word 2000 VBA won't compile when the program opens. I get a compile error because the script is referencing 4 attributes that are in the script for XP but are not located in 2000. I tried trapping out the 4 attributes by putting them in an IF-Then statement, but the compiler ignores the fact that the attributes are in the If-Then statement and blows up anyway.