Best regards
Oskar H.
You can use FSO to read a vbscript file as text and use ExecuteGlobal on the
text to add it to the
current script's namespace exactly as if it had been coded at that point in
the script to start
with.
Include "somecode.vbs"
Sub Include(sCodeFile)
Dim sCode
with createobject("scripting.filesystemobject")
sCode = .OpenTextFile(sCodeFile).ReadAll
End With
ExecuteGlobal sCode
End Sub
Or you can use .wsf files instead of just .vbs files
<job>
<script language="vbscript" src="somecode.vbs" />
<script language="vbscript">
...
...mainline vbscript here...
result = CommonFunction(arg)
...
</script>
</job>
"Oskar H." <osk...@centrum.is> wrote in message
news:umGKTCQzAHA.2100@tkmsftngp05...