Both are fine; there is no difference in meaning. You can use any of these: The details are listed in Annexes A and B to this document. The details are listed in Annexes A and B of this document.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.