Ejemplo n.º 1
0
acReport = 3
dictionaryDelete = CreateObject("Scripting.Dictionary")

#FORMS
for f in accessApplication.CurrentProject.AllForms:
    accessApplication.SaveAsText(acForm, f.FullName, exportPath + '\\' + f.FullName + '.form' )
    accessApplication.DoCmd.Close(acForm, f.FullName)
    dictionaryDelete.Add("FO" + f.FullName, acForm)

#MODULES
for m in accessApplication.CurrentProject.AllModules:
    accessApplication.SaveAsText(acModule, m.FullName, exportPath + '\\' + m.FullName + '.bas' )
    accessApplication.DoCmd.Close(acModule, m.FullName)
    dictionaryDelete.Add("MO" + m.FullName, acModule)

#MACROS
for m in accessApplication.CurrentProject.AllMacros:
    accessApplication.SaveAsText(acMacro, m.FullName, exportPath + '\\' + m.FullName + '.mac' )
    accessApplication.DoCmd.Close(acMacro, m.FullName)
    dictionaryDelete.Add("MA" + m.FullName, acMacro)

#REPORTS
for r in accessApplication.CurrentProject.AllReports:
    accessApplication.SaveAsText(acReport, r.FullName, exportPath + '\\' + r.FullName + '.report' )
    accessApplication.DoCmd.Close(acReport, r.FullName)
    dictionaryDelete.Add("RE" + r.FullName, acReport)

accessApplication.CloseCurrentDatabase()
os.remove(workingfilename)
accessApplication.Quit()