/// <summary>Exports modules from specified EXCEL workbook to an eponymous subdirectory.</summary> private static void ExtractProject(AccessWrapper app, string filename, bool destIsSrc) { try { OnStatusAvailable(app, $"Exporting VBA Source from {filename}; Please be patient ..."); app.OpenDbWithoutAutoexec(filename); ExtractOpenProject(app, destIsSrc); } finally { app.CloseCurrentDb(); } }
/// <summary>Exports modules from specified Access databases to eponymous subdirectories.</summary> /// <remarks> /// </remarks> public override void ExtractProjects(FileDialogSelectedItems items, bool destIsSrc) { if (items == null) { throw new ArgumentNullException(nameof(items)); } using (var app = new AccessWrapper()) { if (app == null) { throw new NotSupportedException("MS-Access not available on this machine."); } foreach (string item in items) { ExtractProject(app, item, destIsSrc); } } }
/// <summary>Exports modules from specified EXCEL workbook to an eponymous subdirectory.</summary> private static void ExtractOpenProject(AccessWrapper app, bool destIsSrc) { var exportPath = CreateDirectory(app.CurrentProjectName, destIsSrc); ExportDaoDatabase(app.AccessApp, exportPath); }