There are many reasons to why a corrupt MS Office document could attack your computer when it is opened. The first reason is Macros, which is typically coded in Visual Basic. The code of the macros could have malicious outcomes.
Another attack vector (although old) is a malicious ".xll" file. A ".xll" file contains C, C++, ".dll", and FORTRAN executable code that could be malicious. A ".xll" file is considered by MS as a legacy Excel format now.
The last thing I can think off is a malicious ".maq" file that is used by MS Office. It is a regular shortcut, but when opened it can automatically run a query on a database preconfigured or specified in the query. If the query is malicious (ex. DROP DATABASE PASSWORDS), it will be attacking, or should I say modifying the data in the database machine/environment.