chelh / VBASync

Cross-platform tool to synchronize macros from an Office VBA-enabled file with a version-controlled folder
Other
159 stars 46 forks source link

Support for Access databases #1

Open chelh opened 8 years ago

chelh commented 8 years ago

Add support for extracting and publishing VBA from/to Access databases (.mdb and .accdb).

rubberduck203 commented 7 years ago

Was there any particular difficulty that you were having with this? I created this functionality for Rubberduck a few years ago, albeit we leveraged the VBIDE library. I no longer have an office install, but I'd be happy to talk out any issues.

chelh commented 7 years ago

Rubberduck is working within the Access/VBE object model though, correct? This project doesn't use that object model; it reads and writes directly to the Office file.

rubberduck203 commented 7 years ago

It does, and you are gonna have one heck of a time yanking VBA files out of Access without the VBIDE library... Access doesn't share the OpenXml format.

I don't precisely recall, but I believe there are hidden system tables in the accdb that keep track of forms and code modules, but it's been a long while since I looked at that.

rubberduck203 commented 7 years ago

Regardless, I wanted to leave the offer to use me as a rubberduck anytime.

chelh commented 7 years ago

Looks like Jackcess can read Access files from Java. So what's needed is a .Net port of that.

rubberduck203 commented 7 years ago

Are you sure that project can get to the VBA modules? It doesn't look like it at a glance.

chelh commented 7 years ago

If I take that project up, I'm fairly certain I would find a vbaProject.bin somewhere in the internal structure.


EDIT: Nope. After playing around with Jackcess, I can say that porting it to .Net is easier said than done, and VBA project information is spread across at least two system tables, not stored in a binary structure similar to Word/Excel/Outlook VBA.

mashaiq commented 6 years ago

If you want to spend a little money - this solution works great https://dev2dev.de/index.php?lang=en and has a nice support from the developer.