The Bible often describes itself as acting. How is that possible? The Bible, if it is like any other book, is an inanimate object. The Bible can’t “foresee” or “speak.” But the Bible does say that Scripture does those things.
Galatians 3:8 says, “The Scripture, forseeing that God would justify the heathen through faith, preached before the gospel unto Abraham, saying, ‘In thee shall all the nations be blessed.” Romans 9:17 records, “The Scripture saith unto Pharaoh, Even for this purpose I have raised thee up.”
Scripture is not the fourth member of the Trinity, but something special is communicated in this phenomenon. It is possible that the Scripture’s volitional acts are simply an anthropomorphism, but even if one accepts this, what sort of relationship between Scripture and God makes such language possible. Perhaps, God has cited Scripture this way in order to testify to Scripture’s unique position and to Scripture’s unique relationship to God.
In both instances, “Scripture” stands in the position of God himself. It was God who spoke to Abraham and it was God who spoke to Pharaoh through Moses. This is similar to Jesus’ self-descriptions of “I AM the door,” or “I AM the good Shepherd.” While there are similarities, there are also massive differences. The word “Scripture” is used in place of God himself. This is more than metaphor. This is interchange. How is it this interchange possible? Because God’s Word is God’s words. These acts could be attributed to “Scripture” only as the result of such a habitual identification, in the mind of the writer, of the text of Scripture with God as speaking, that it became natural to use the term “Scripture says,” when what was really intended was “God, as recorded in Scripture, said.”
 Benjamin B. Warfield, The Works of Benjamin B. Warfield: Revelation and Inspiration, vol. 1 283–284.