All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The oath that is effective and which necessitates expiation when breaking the oath is that in which the Name of Allah is uttered or one of His Names or Attributes are uttered.
Az-Zaad reads, "The oath that necessities expiation in case he breaks the oath is the oath by Allah, or by one of His Attributes, or by the Quran, or by the Mus-haf (physical copy of the Quran)…"
What is meant is to verbally make the oath. An oath by the Quran is also considered an effective oath, because the Quran is the speech of Allah.
Al-Mubdi' Sharh al-Muqni' reads, "If he makes an oath by the speech of Allah, or by the Mus-haf, or by the Quran, or by one verse from the Quran, then it is an oath according to the view of the majority of the scholars, because the Quran is the speech of Allah and one of the Attributes of His Essence; so the oath is effective."
The oath is not effective just because the Quran is open or because the person said, "I will not do so" while the Mus-haf was in front of him, or he was reading it, or it was near him. Rather, the oath becomes effective by uttering the oath by Allah, as we have already mentioned.
Therefore, if you did not make an oath by Allah or by the Mus-haf, or by the Quran, then there is no effective oath, and you do not have to expiate for it or do anything else if you did what you said that you would not do.
Allah knows best.