Clearing the Contnet of all Application macros
Is there a way to clear all application macro contents from within the VBP tool? I have a step that creates/populates macros at the beginning of the project via an XML file generated from a SQL query, but I would like to make sure that the macros are empty or non-existant prior to the step to populate them. This is not a critical issue, but in the event that there is an error with the macro population, some of the macros may contain incorrect data (from a previous run) and cause annoying error messages.
|
Depending on what you mean by 'application macro contents', one of the following should work (in a Run Script action [VBScript sample code]):
Application.Macros(vbldMacroTemporary).Clear Application.Macros(vbldMacroProject).Clear Application.Macros(vbldMacroGlobal).Clear |
That helps, and I can work with that. It will take a bit of re-coding though.
What I was really looking for was a way to remove the values from all of the existing project macros, but leave the macros. (The code was originally written with macro.item to set the value instead of macro.add) |
For Each macro In Application.Macros(vbldMacroProject)
macro.Value = "" Next |
All times are GMT -5. The time now is 07:46 AM. |
Copyright © 1999-2023 Kinook Software, Inc.