In this paper we investigate how discourse structure affects the meanings of words, and how the meanings of words affect discourse structure. We integrate three ingredients: a theory of discourse structure called SDRT, which represents discourse in terms of rhetorical relations that glue together the propositions introduced by the text segments; an accompanying theory of discourse attachment called DICE, which computes which rhetorical relations hold between the constituents, on the basis of the reader's background information; and a formal language for specifying the lexical knowledge—both syntactic and semantic—called the LKB. Through this integration, we can model the information flow from words to discourse, and discourse to words. From words to discourse, we show how the LKE permits the rules for computing rhetorical relations in DICETO be generalized and simplified, so that a single law applies to several semantically related lexical items. From discourse to words, we encode two novel heuristics for lexical disambiguation: disambiguate words so that discourse incoherence is avoided, and disambiguate words so that rhetorical connections are reinforced. These heuristics enable us to tackle several cases of lexical disambiguation that have until now been outside the scope of theories of lexical processing.