a name can be something that you call someone, someplace, or something, but the name of the lord can also refer to the authority, reputation, or sake of the lord. For example,
"Stop in the Name of Love" uses the phrase "in the name of love" to indicate "for the sake of". Also, if the someone invokes the "name of the king" in enforcing the pronouncements of the king, whether it be the law of the king or actions taken elsewhere of war or exploration, it means "by the authority" or "for the sake of" the king and his reputation, what he represents.
Speaking in the Name of God means speaking with authority, on His behalf, for his sake, and/or such. Taking the Lord's Name in vain could be to speak without authority or without regard to (not for the sake of) God. Commonly, if someone were speaking in the Name of the Lord, they might invoke the Name of the Lord, or the Name of God directly as in saying, "God says..." or "According to God, ...", or perhaps as an epithet.
One of the important things to note is that the prophets of the Old Testament are regarded as speaking in the Name of God. Who shall Moses say sent him? If Moses says a name (as in a proper noun denoting a person, such as "Fred"), then anybody could take the name of "Fred" and be called "Fred". People take the name of Krishna, Jesus, Mohammed, George, etc., etc. But people can't take the name of God as their name. So he is told "i am that i am" has sent him. Moses is being sent to act in God's Name - not to show up on Pharaoh's doorstep saying, "Fred sent me."