There are Names of Allaah which He is named with and others are named with as well such as al-Hayy, al-'aalim, al-mu'min, al-kariim, al-shaakir, etc.
If someone swears an oath by such a name then according to al-Shaafi'i an oath does not come to be even if he intended by means of it the Name of Allaah because an oath is only contracted because of the sanctity of the Name and when there is the possibility of al-ishtiraak then there is no sanctity for it. Mere intention is not sufficient for the contracting of an oath.
The Hanaabilah, in contrast, believe that the oath does come into effect. They agree that intention alone is not sufficient for an oath to come into effect but here when the person has made the intention then the name which harbors the possibility of being the name of someone other than Allaah and the Name of Allaah has now - because of the intention - been directed to one of these two possibilities namely the Name of Allaah and is like having been explicitly stated.
And if he intended to swear by means of someone else (other than Allaah) using that name then the oath does not come to be because of his intention.