Theodicy, p. 151:
51. As for the volition itself, to say that it is an object of free will is incorrect. We will to act, strictly speaking, and we do not will to will; else we could still say that we will to have the will to will, and that would go on to infinity. Besides, we do not always follow the latest judgement of practical understanding when we resolve to will; but we always follow, in our willing, the result of all the inclinations that come from the direction both of reasons and passions, and this often happens without n express judgement of the understanding.
52. All is therefore certain and determined beforehand in man, as everywhere else, and the human soul is a kind of spiritual automaton, although contingent actions in general and free action in particular are not on that account necessary with an absolute necessity, which would be truly incompatible with contingency. Thus neither futurition in itself, certain as it is, nor the infallible prevision of God, nor the predetermination either of causes or of God's decrees destroys this contingency and this freedom; That is acknowledged in respect of futurition and prevision, as has already been set forth. Since, moreover, God's decree consists solely in the resolution he forms, after having compared all possible worlds, to choose what one which is the best, and bring it into existence together with all that this world contains, by means of the all-powerful word Fiat, it is plain to see that this decree changes nothing in the constitution of things: God leaves them must as they were in the state of mere possibility, that is, changing nothing either in their essence or nature, or even in their accidents, which are represented perfectly already in the idea of this possible world. Thus that which is contingent and free remains no less so under the decrees of God than under his prevision.
Scotus, and his Sequelae, would ask what the origin of these possible worlds is. Do they originate in the divine intellect, or are they eternally represented by the essence, or what? Elsewhere Leibniz made the odd claim that the divine ideas are represented by the divine intellect, but what could that mean? If the divine intellect does the representing, what is perceiving the representation? Generally, ideas, or the things that there are ideas of, are represented to the intellect, that is, if one is going to use representation at all in conjunction with the divine ideas. One question we might want to ask Leibniz is if the essences of possible things are eternal, since God does not alter their essences or apparently generate them. But if they are eternal, are they then divine or necessary, and doesn't this posit a plurality, indeed an infinity, of eternal beings?