create.wsf
This is the VBScript file that creates the Access Database (
createOfficeApp()
), inserts the module
insertMOdule()
and finally calls
main()
, using the
run
method that is defined in the Access
Application
object.
<job>
<script language="VBScript" src="..\..\..\create-MS-Office-app.vbs" />
<script language="VBScript">
option explicit
dim app
set app = createOfficeApp("access", currentDir() & "created.accdb")
'
' Insert a module. The 3rd parameter (1) indicates a «normal» module (vbext_ct_StdModule).
' (2, = vbext_ct_ClassModule, inserts a class).
'
insertModule app, currentDir() & "functions.bas", "funcs", 1
'
' Run the function main.
'
app.run "main", currentDir()
'
' Apparently, it not necessary to save an MS-Access «document».
'
wscript.echo "The end"
</script>
</job>