Shape.Script property (Word)
Returns a Script object, which represents a block of script or code for an image on a webpage.
Syntax
expression. Script
expression Required. A variable that represents a Shape object.
Remarks
If the webpage contains no script, nothing is returned.
Example
This example displays the type of scripting language used in the first shape in the active document.
Set objScr = ActiveDocument.Shapes(1).Script
If Not (objScr Is Nothing) Then
Select Case objScr.Language
Case msoScriptLanguageVisualBasic
MsgBox "VBScript"
Case msoScriptLanguageJava
MsgBox "JavaScript"
Case msoScriptLanguageASP
MsgBox "Active Server Pages"
Case Else
Msgbox "Other scripting language"
End Select
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.