Location Property

         Example         Applies To

Returns the location of the script anchor in the specified HTML document. Can be either of the following MsoScriptLocation constants: msoScriptLocationInBody or msoScriptLocationInHead. Read-only Long.

Remarks

Script tags in an HTML document can appear anywhere between the <HTML> tags in the document. In Microsoft Word, Excel, or PowerPoint, only the script anchors located between the <BODY> tags are visible. Additional HTML script that appears before or after the <BODY> tags is stored in but isn’t visible to the user.

The Scripts collection contains all of the script anchors that appear in the document, whether inside or outside of the main body of the document. Using the Location argument of the Add method, you can insert script anchors within the <HEAD> and <BODY> tags in the HTML document. You can also use the Location property to determine where a particular script anchor is stored within the document.