language Property
Returns or sets a String that represents the language in which the script for the specified object is written.
expression.language
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The language property can be one of the following String values:
Value | Description |
---|---|
C# | Script is written in C#. |
CS | Script is written in C#. |
CSharp | Script is written in C#. |
JScript | Script is written in JScript. |
JavaScript | Script is written in JavaScript. |
JS | Script is written in JavaScript. |
VBS | Script is written in Visual Basic Scripting Edition (VBScript). |
VBScript | Script is written in VBScript. |
VB | Script is written in Microsoft Visual Basic. |
VisualBasic | Script is written in Visual Basic. |
XML | Script is written in XML. |
language | Script is a browser-supported language. |
Example
The following example sets the language to "JavaScript" for the first SCRIPT element in the active document. This example assumes that there is at least one script element in the active document.
Dim objScript As FPHTMLScriptElement
Set objScript = ActiveDocument.Scripts.Item(0)
objScript.Language = "JavaScript"