We develop a model of many-to-many matching with contracts that subsumes as special cases many-tomany matching markets and buyer-seller markets with heterogeneous and indivisible goods. In our setting, substitutable preferences are sufficient to guarantee the existence of stable outcomes; moreover, in contrast to results for the setting of many-to-one matching with contracts, if any agent's preferences are not substitutable, then the existence of a stable outcome cannot be guaranteed. In many-to-many matching with contracts, a new market design issue arises: The design of the contract language can impact the set of stable outcomes. Bundling contractual primitives encourages substitutability of agents' preferences over contracts and makes stable outcomes more likely to exist; however, bundling also makes the contractual language less expressive. Consequently, in choosing contract language, market designers face a tradeoff between expressiveness and stability.