How can I enumerate the macro list in Access97?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In VBA in an open DB, I am creating a new blank DB, and copying over every
object from my open DB. Everything can be copied except for the Macros. I
can't find a collection of them or any way to enumerate them.

Any ideas out there? I just need to loop thru the list of existing macros
so I can use CopyObject on each of them.
 
Believe it or not, they're called Scripts, e.g.:
Dim doc As DAO.Document
For Each doc in dbEngine(0)(0).Containers!Scripts.Documents
etc
 
I usually just rely on the MSYSObjects table for this:

Select Name from MSYSOBJECTS where Type = -32766

Although it doesn't give as much information as the DAO.Document
object, it works for determining which ones exist.


Chris Nebinger
 
Back
Top