The VBA solution didn't print the CodeBehindForm section for me, but I did get success using the Interop libraries.
using Microsoft.Office.Interop.Access;
using System;
namespace AccessExporter
{
class Program
{
static void Main(string[] args)
{
ApplicationClass app = new ApplicationClass();
String fileName = @"C:\AccessFile.accdb";
app.Visible = false;
app.OpenCurrentDatabase(fileName);
foreach (AccessObject obj in app.CurrentProject.AllForms)
{
Console.WriteLine(obj.Name);
app.SaveAsText(AcObjectType.acForm, obj.Name, String.Format(@"C:\{0}.txt", obj.Name));
}
app.CloseCurrentDatabase();
}
}
}