Dim thing As AccessObject
For Each thing In CurrentProject.AllForms
Access.Application.SaveAsText acForm, thing.Name, localPath & thing.Name & ".frm"
Next
Dim component As VBComponent
For Each thing In CurrentProject.AllModules
Set component = Application.VBE.ActiveVBProject.VBComponents(thing.Name)
Access.Application.SaveAsText acModule, thing.Name, localPath & thing.Name & ToFileExtension(component.Type)
Next
For Each thing In CurrentProject.AllReports
Access.Application.SaveAsText acReport, thing.Name, localPath & thing.Name & ".rpt"