This example finds all the settings files (*.rsf) in the current directory, uses SaveXML to save the color configuration settings for each file in XML format, then uses TransformXML to create HTML files that contain a summary of the color configuration information.

Sub TransformAllSettingsFiles()

Dim SettingsName As String 'directory list

Dim MyName As String 'base filename

Dim Extn As Integer 'base filename length


' Find the first settings file in current directory

SettingsName = Dir("*.rsf")


Do While SettingsName <> ""

' Remove the extension from the end of filename

Extn = InStr(SettingsName, ".rsf") - 1

MyName = VBA.Left(SettingsName, Extn)


' Save color information in XML format, and convert result to

' an HTML file.

Session.SaveXML MyName & ".xml", rcXMLColors, rcOverwrite, rcAll

Session.TransformXML MyName & ".xml", _

"c:\program files\attachmate\reflection\transforms\ibm\ribmhtml.xsl", _

MyName & ".html"


' Call Dir again without arguments to get next matching file

SettingsName = Dir


End Sub