Programmatically export VBA source code from objects

J

James Harbaugh

Is there a way using VBA/VB to export the source code from an object in an
Access database and save the code in a folder? I have searched for a method
or utility to do this but so far have come up empty. Please let me know if
there is a way to do this. Thanks for your assistance.

James Harbaugh
 
D

Douglas J. Steele

The Access Application objecte has an undocumented SaveAsText method. Arvin
Meyer has a good example of how to use it at
http://www.datastrat.com/Code/DocDatabase.txt

However, be aware that it is undocumented, which means that it could
disappear in a future version, so you might think twice if this is something
you plan on building into an application.
 
J

James Harbaugh

Thanks. It will be used in an app strictly for our workgroup so I am not
particularly concerned about it being an undocumented function.

Jim Harbaugh
 
Top