243
‘ is this document modified?
if app.DocumentCache(idx).Modified then sTable = "Yes"
sTable = "</td><td>"
‘ is this document read-only?
if app.DocumentCache(idx).ReadOnly then sTable = "Yes"
‘ close row
sTable = "</td></tr>" + newline
next
sTable = n "</table>"
‘ add a new document (False = don’t create from default template -
blank)
app.NewDocument(False)
‘ insert the table (note that the ActiveDocument will be the new
document
‘ created above)
app.ActiveDocument.InsertText sTable, False
‘ switch to browse mode
app.CurrentView = 2
‘ wait for user to re-enter edit mode
while app.CurrentView <> 1
‘ Wait is a home-grown routine to make up for the loss of
‘ DoEvents in VBScript. it will pause for a given number of
‘ milliseconds without locking the interface
app.Wait(100)
wend
‘ return to the original document
app.DocumentIndex = nCurrentIdx
MsgBox "Script Completed."
‘ free the references
set app = nothing
End Sub
‘ function example
function GetDisplayName(fname)
if fname = "" then
GetDisplayName = "(untitled)"
else
GetDisplayName = fname
end if
end function
</pre>
</body>
</html>
Содержание COLDFUSION STUDIO 4.5-USING COLDFUSION...
Страница 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Страница 16: ...xvi Contacting Allaire...
Страница 90: ...82...
Страница 130: ...122...
Страница 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Страница 182: ...190...