G
Guest
Hi,
I need to export all the code from an Acces database to txt files. I know
how to do it manually, but I need to automate the process. I don't know
Access object model very well and all I could come up with was to use
CurrenProject.AllModules and OutputTo, but I need to export Form and Report
modules as well.
What is the preferred way of doing this?
This is the part of my code that exports all modules:
set access = CreateObject ("Access.Application")
access.Visible = true
access.OpenCurrentDataBase "C:\CBRDB3\***.mdb", false, "******"
set cp = access.CurrentProject
For Each m In cp.AllModules
access.DoCmd.OutputTo acOutputModule, m.Name , acFormatTXT, "C:\test\" &
m.Name & ".txt", false
Next
I need to export all the code from an Acces database to txt files. I know
how to do it manually, but I need to automate the process. I don't know
Access object model very well and all I could come up with was to use
CurrenProject.AllModules and OutputTo, but I need to export Form and Report
modules as well.
What is the preferred way of doing this?
This is the part of my code that exports all modules:
set access = CreateObject ("Access.Application")
access.Visible = true
access.OpenCurrentDataBase "C:\CBRDB3\***.mdb", false, "******"
set cp = access.CurrentProject
For Each m In cp.AllModules
access.DoCmd.OutputTo acOutputModule, m.Name , acFormatTXT, "C:\test\" &
m.Name & ".txt", false
Next