Printout steps within a macro? (1 Viewer)

woodsy74

Registered User.
Local time
Today, 10:12
Joined
Jul 25, 2012
Messages
26
I've inherited a few Access macros and I am wondering if it's possible to printout all of the steps that contained within the macro. I'm trying to walk through them but they each have 30+ actions so it would just be easier if I could printout each action and then walk through them. Is that possible?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:12
Joined
Feb 19, 2013
Messages
16,555
that is one of the issues with macros. Options are multiple screenshots or use the option to convert macros to vba.

I've just looked and there is an option in the database documenter to document macros, but no idea what it would show
 

jdraw

Super Moderator
Staff member
Local time
Today, 10:12
Joined
Jan 23, 2006
Messages
15,364
I don't use macros generally. I did some experimenting with named data macros and here is what I used to see the source of the macro (in xml)

Named Macro to write audit log info into tblAuditLog
13-May-2017 NOTE:: You can copy a named macro via the immediate window using SaveAsText acTableDataMacro, "yourTableName", "Your directory and Filename and extension"
My example: SaveAsText acTableDataMacro, "tblAuditLog", "C:\users\mellon\documents\macWriteAuditRec.txt" and
you can print the xml tree formatted using Notepad++ with XML plugin.

I don't know if this applies to "general"macros.
 

isladogs

MVP / VIP
Local time
Today, 14:12
Joined
Jan 14, 2017
Messages
18,186
A couple of years ago, I created my own deep search and replace tool which included the ability to print the contents of macros to a report and optionally to edit them.

See https://www.access-programmers.co.uk/forums/showthread.php?t=292987

The code was very complicated because (unlike VBA procedures) macros are not plain text files and all the extraneous garbage has to be removed to make them readable..
My advice would be to convert all your macros to VBA procedures using the built in converter. Then bite the bullet and use VBA from now on
 

woodsy74

Registered User.
Local time
Today, 10:12
Joined
Jul 25, 2012
Messages
26
Thanks all. The Database Documenter seems to get me what I needed.
 

Users who are viewing this thread

Top Bottom