PDA

View Full Version : Nested macros


Ken
09-02-2005, 05:01 PM
I am trying to use a crude version of macro arrays and running into issues. I would like it be able to have 3 (or more) macros with the names

SUMMARY0
SUMMARY1
SUMMARY2

and I would like to access them based on an index named %INDEX%. So that I can dump the contents to a file. So I would use a WriteTextToFile command to write the correct value to a file something like

%DATA%, %MY_FILE%, %INDEX%, %%SUMMARY%INDEX%%

Is this possible??

Ken

kinook
09-05-2005, 06:53 AM
[vbld_AllMacros().Item("SUMMARY" & vbld_AllMacros().Item("INDEX").Value).Value]

or

[Application.ExpandMacros("%%SUMMARY" & Application.ExpandMacros("%%INDEX%%") & "%%")]