Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.01 KB

Word.Range.Scripts.md

File metadata and controls

50 lines (33 loc) · 1.01 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.Scripts property (Word)
vbawd10.chm157155653
vbawd10.chm157155653
Word.Range.Scripts
233acf3a-3151-f4f2-e5df-815edeca1dd1
06/08/2017
medium

Range.Scripts property (Word)

Returns a Scripts collection that represents the collection of HTML scripts in the specified object.

Syntax

expression. Scripts

expression Required. A variable that represents a Range object.

Example

This example tests the second Script object in the specified range to determine its language.

Select Case Selection.Range.Scripts(2).Language 
 Case msoScriptLanguageASP 
 MsgBox "Active Server Pages" 
 Case msoScriptLanguageVisualBasic 
 MsgBox "VBScript" 
 Case msoScriptLanguageJava 
 MsgBox "JavaScript" 
 Case msoScriptLanguageOther 
 MsgBox "Unknown type of script" 
End Select

See also

Range Object

[!includeSupport and feedback]