An excerpt from Rabbi Kaplan's "The Handbook of Jewish Thought"
Just as we are commanded to revere God Himself, so must we respect places and objects which are associated with His worship. The Torah teaches this through juxtaposition, as God says, "Revere My sanctuary -- I am God" (Leviticus 19:30, 26:2). One should therefore show the utmost respect for a synagogue, which is also considered a sanctuary, as God told His prophet, "Although I have removed them far off among the nations, and although I have scattered them among the peoples, still, I have provided them with a miniature sanctuary in the countries where they have been exiled" (Ezekiel 11:16).
It is forbidden to destroy anything associated with God's worship. This is learned from another juxtaposition in the Torah: "You must tear down their altars, break their stone pillars, burn their sacred groves, and cut down the statues of their gods… But you must never do anything like this to [the sacred objects of] God your Lord" (Deut. 12:3-4). Accordingly, it is forbidden to wantonly destroy a synagogue, or anything else which is used in worship.
Similarly, it is forbidden to destroy even a single letter of any of the 10 divine names of God. This is learned from the continuation of the same verse: "You must obliterate their names from that place. But you must never do anything like this to God your Lord" (ibid.). It is therefore forbidden to erase a divine name written on parchment or paper, unravel one embroidered in cloth, or melt down a piece of metal or a seal upon which a divine name is engraved or impressed.
If any word resembling a divine name is written with the specific intent that it have a secular meaning, or if its context unambiguously implies that it is not a divine name, it may be erased. However, if it is written with no specific intent, it may not be destroyed.
As soon as one writes a divine name, any suffix added on to it is also considered sacred and may not be erased. On the other hand, it is permitted to erase a prefix attached to a divine name.
It is forbidden to destroy a divine name, even one partially erased.
It is forbidden to destroy a divine name, even if it has already been partially erased. If a divine name is written on a wall, some authorities maintain that it is forbidden to paint over it. One should likewise be careful not to perforate a divine name in any way.
It is only forbidden to destroy a divine name when it is written on a single object or sheet. However, if it is merely put together with alphabet blocks or movable type, it may be separated. Similarly, those who spell out the divine name Shadai with their tefillin straps may undo the straps without being concerned about destroying the name, although the custom itself is not proper.
Similarly, it is only forbidden to erase a divine name that is written in a normal fashion. However, where it is written in mirror image, as on a rubber stamp or immovable type, it may be destroyed. For this reason, it is permissible to destroy a phonograph record, or to erase or copy over a sound or video tape, even though a divine name may be recorded on it.
[Similarly, it is permitted to delete God's name from a computer screen, as nothing is being erased, except for electromagnetic impulses. In fact, anything displayed on a screen is actually erased and rewritten it 50 or 60 times each second. - Ed.]
The commandment not to destroy God's name applies only to the ten specific divine names. Therefore, any other appellation or adjective used to designate God may be erased. Similarly, it is permitted to erase God's name written in any language other than Hebrew.
It is likewise permitted to erase any abbreviation of a divine name, such as the double Yud or Heh used to abbreviate the Tetragrammaton, as long as the abbreviation itself is not a divine name. However, some maintain that even the first two letters of Adonoy or Eheyeh should not be erased when used as an abbreviation.
God's name written in a language other than Hebrew should be saved from desecration.
Although it is permissible to erase God's name in a language other than Hebrew, it is forbidden to desecrate such a name in any manner. Therefore, it is forbidden to throw a paper upon which such a name is written in the garbage or any other place where it may be desecrated. If one has letters or notes with God's name written in a language other than Hebrew, one may burn them to save them from desecration.
One should therefore be careful not to write God's name in any language on a letter or note which may be thrown away. In such a case, it is customary to abbreviate God's name as G-d or L-rd.
It is customary to write "bet-hey" (abbreviation of Baruch Hashem, "Blessed be the Name" or "bet-ayin-hey" (BeEzrat Hashem, "With the Help of the Name") in the upper right hand corner of letters. However, some people prefer the abbreviation "bet-samech-daled" (BeSiyatta DeShamaya, Aramaic for "With the Help of Heaven") in order to avoid writing any allusion to God's name in a letter that might be thrown out.
Writing Other Names
It is permitted to erase names like Jeremiah, Isaiah, or Zechariah, even thought he last two letters of such names spell out the divine name Yah, since the entire name is considered a single word. Nevertheless, it is customary to abbreviate such names, leaving out the final hey, so as not to desecrate a divine name in any manner whatsoever. Similarly, it is customary to write Yehudah with an aleph rather than a final hey, lest one accidentally leave out the letter dalet and write the Tetragrammaton.
It is likewise customary to write the Hebrew number 15 as tet-vov rather than yud-hey, which is a divine name. Similarly, 16 is written as tet-zayin rather than as yud-vov, which resembles a divine name. These changes are made even when they are part of a larger number such as 115, 416, etc. It is likewise customary to transpose the letters of numbers which might otherwise spell out a word with a negative connotation, such as in the case of 270 (resh-ayin, which means "evil") or 304 (shin-daled, which spells the word for "demon").
Some authorities maintain that one should avoid writing the greeting "Shalom" in a letter which may be thrown away, but the custom is to ignore this opinion.
It is forbidden to make personal use of anything upon which a divine name is written. For example, it is forbidden to drink from a vessel or wear a ring upon which such a name is written or engraved. However, if such a ring or locket is worn as a sign of divine protection, it is permissible as long as the divine name is covered.
A divine name only sanctifies the surface upon which it is written. Therefore, if it is written on any object, the name may be carefully cut or shaved off and set aside, after which the article may be used. However, some maintain that the reason for this limitation is because a vessel is an improper place on which to write, whereas if a divine name is written on a proper place such as parchment or paper, then the entire sheet is sanctified and may no longer be used.
It is forbidden to bring anything containing a divine name into a place where it may not be read, as the Torah states, "[This scroll] must always be with [the king], and he shall read from it all the days of his life" (Deut. 17:19). That is, it shall be with him only when he may read from it. It is therefore forbidden to stand naked before a divine name, or carry anything upon which it is written into a lavatory or bath, unless the name is completely covered.
An excerpt from Rabbi Kaplan's "The Handbook of Jewish Thought"