Hmm,
the problem is, you generally can't do this with a buttons script.
It's because the menu item used for this method is not listed in whitelist of those menu items allowed to be executed via scriptings.
You can add this menu item to the whitelist, but it's has to be done in the registry on every computer using this form (risky and difficult to realize).
Also, if the menu Item has not be execute once before manually by the user, the script also fails.
I have no idea what causes this behavior in Acrobat, very strange.
Whatever. Here is the script I used to save a PDF as txt (I only tested it in Acrobat X via console):
app.execMenuItem("SaveAsSubmenu.avSaveAsMoreSaveOptionsSubmenu.com.adobe.acrobat.plain-text");