PDA

View Full Version : Setting macros from VBScript


mweinberger
12-23-2005, 06:27 PM
Hello,

How do I set a macro from a VBScript function? The following

Application.ExpandMacrosAndScript("%<property>%")

is used to retrieve macro property values only. How can I set an already existing property value? The following unfortunately doesn't work. :-(

Application.ExpandMacrosAndScript("%<property>%") = "New Value"

Thanks in advance,

Martin

kevina
12-23-2005, 06:47 PM
To add a temp macro, use vbld_TempMacros().Add "MacroName", "MacroValue"

or for any type of macro, use this form: Application.Macros(vbldMacroTemporary).Add "MacroName", "MacroValue"

See http://www.visualbuild.com/Manual/?macrosaddmethod.htm for the details.

mweinberger
12-23-2005, 07:01 PM
Cool! It works! Thanks Kevin,