CasewareDocs

HTMLEncode

This method converts a string to an HTML-encoded string, i. e. when embedded in a block of text the characters < and > are encoded as &lt and &gt. It will support you in constructing the standard output format of SendToMessage which will be used for an Caseware Standard Import Routine.

The method receives a string as a parameter and returns the html-encoded string.

Option Explicit 
Sub Main()
On Error GoTo erh
Dim cmds As Object
Set cmds = SmartContext.MacroCommands.SimpleCommands
MsgBox cmds.HtmlEncode("a&b<c>d") 'Will display a&amp;b&lt;c&gt;d
Exit Sub
erh:
MsgBox "error " & err.description
End Sub
HTMLEncode | Caseware Docs