こちらのサイトを。
参考:http://rope0419.blog19.fc2.com/blog-entry-114.html
便利w。
'Grep機能(見積もり用)
Public Function AllGrep() As Long
Dim obj As Object
Dim i As Long
Dim sDir As String
Dim sName As String
Dim tdf As TableDef
Dim qdf As QueryDef
Dim sExt As String
'拡張子とか
sExt = ".txt"
sDir = CurrentProject.Path & "\ObjectsText\"
'<< *** TABLE *** >>
SaveAsText acDataAccessPage, "", sDir & "Tables" & sExt
'<< *** QUERY *** >>
For Each qdf In CurrentDb.QueryDefs
sName = qdf.Name
If Not (Left(sName, 1) = "~") Then
SaveAsText acQuery, sName, sDir & sName & sExt
End If
Next qdf
'<< *** MODULE *** >>
For i = 0 To CurrentProject.AllModules.Count - 1
sName = CurrentProject.AllModules(i).Name
SaveAsText acModule, sName, sDir & sName & sExt
Next i
'<< *** FORM *** >>
For i = 0 To CurrentProject.AllForms.Count - 1
sName = CurrentProject.AllForms(i).Name
SaveAsText acForm, sName, sDir & sName & sExt
Next i
'<< *** MACRO *** >>
For i = 0 To CurrentProject.AllMacros.Count - 1
sName = CurrentProject.AllMacros(i).Name
SaveAsText acMacro, sName, sDir & sName & sExt
Next i
'<< *** REPORT *** >>
For i = 0 To CurrentProject.AllReports.Count - 1
sName = CurrentProject.AllReports(i).Name
SaveAsText acReport, sName, sDir & sName & sExt
Next i
'<< *** END *** >>
MsgBox "オワタ", vbInformation
End Function