We've been told we should not take the name of the Lord in vain. This commandment is often interpreted to mean "no swearing." Using offensive language is indeed wrong, but misusing or abusing the name of the Lord is worse. Whenever we do something to serve our own vanity, and we do it in the name of the Lord, we are breaking that commandment.
Some of the ways we take the Lord's name include baptism, prayer, Christian service, and ministry. If we pray to be noticed by others, if we rebel against our baptismal covenants, or if we use our position as a minister for personal gain, we are using the name of our Lord in vain.