ƯÁ¤ ¸í·É(command)¿¡ ¿¬°üµÈ ÅØ½ºÆ® °ªÀ» ´ëÇ¥ÇÏ´Â ¹®ÀÚ¿À» ¹ÝȯÇÑ´Ù.
| °³Ã¼ |
|---|
| FPHTMLDocument |
| IHTMLDocument2 |
| IHTMLTxtRange |
ÁÖ¾îÁø ¸í·É¿¡ µû¸¥ °ü·Ã °ªÀ» µð½ºÇ÷¹ÀÌÇÑ´Ù.
<BUTTON onClick="QueryCommand()">¸í·É¿¡ µû¸¥ °ü·Ã °ª ¾ò±â</BUTTON>
<SCRIPT language=VBScript>
Sub QueryCommand() 'ƯÁ¤ ¸í·ÉÀÇ ¹®ÀÚ¿À» Ãâ·ÂÇÑ´Ù.
Dim objApp As FrontPage.Application
Dim objDoc As DispFPHTMLDocument
Dim strUser As String
Dim strValue As String
Set objApp = FrontPage.Application
Set objDoc = objApp.ActiveDocument
strUser = InputBox("¼öÇàÇÒ ¸í·ÉÀ» ÀÔ·ÂÇ϶ó.")
strValue = objDoc.queryCommandText(strUser)
MsgBox "ÁöÁ¤ÇÑ ¸í·ÉÀÇ °á°ú°ªÀº " & strValue
End Sub
</SCRIPT>