N
Nigel_DG
Hi,
I am working on a project for designers to create automated templates for
authors to work into. I am creating a set of standard macros that our
designers can amend and take into the code window of a template document, and
I would then like to be able to access the macro names to automate the
creation of a custom toolbar containing the macros used in the document.
Is there a way to access macros as a collection (as you do documents,
tables, etc.)? If not, is there any way of getting this information from the
active document easily? I have currently written a routine to access the code
window, strip out the text to a new document, delete all lines that are not
macro declarations and copy them back into the main document to iterate
through with a second macro that populates a new custom toolbar. While this
works, it is not easily extensible and is pretty inflexible, so I am keen to
find a more elegant solution if one exists! I am thinking something along the
lines of ActiveDocument.macros(1).name kind of simplicity...
Many thanks,
Nigel
I am working on a project for designers to create automated templates for
authors to work into. I am creating a set of standard macros that our
designers can amend and take into the code window of a template document, and
I would then like to be able to access the macro names to automate the
creation of a custom toolbar containing the macros used in the document.
Is there a way to access macros as a collection (as you do documents,
tables, etc.)? If not, is there any way of getting this information from the
active document easily? I have currently written a routine to access the code
window, strip out the text to a new document, delete all lines that are not
macro declarations and copy them back into the main document to iterate
through with a second macro that populates a new custom toolbar. While this
works, it is not easily extensible and is pretty inflexible, so I am keen to
find a more elegant solution if one exists! I am thinking something along the
lines of ActiveDocument.macros(1).name kind of simplicity...
Many thanks,
Nigel