Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is is possible to set the Predefined Values in Drop-down with a macro?
Did you try creating one variable with required proeperties set in the fron-end (one time)
then read propeties (using getproperties method) from this variable and apply it to all the variables that you are creating in your macro (using setproperties method)
Why would you want to do that?
Looks like you are already populating the values in your variable dynamically.
OR
you creating a lot of variables on the fly and want to set the value list property for each them as 'predefined values in drop down' by writing a macro'?
I am creating variables on the fly via a macro.
I have not been able to figure how to set the "Predefined Values in Drop-down" with the macro.
Maybe this can't be done, but I'm hoping for suggestions.
Did you try creating one variable with required proeperties set in the fron-end (one time)
then read propeties (using getproperties method) from this variable and apply it to all the variables that you are creating in your macro (using setproperties method)
Reading the properties from one variable and then trying to set the same properties to another variable cause VBScript to error with -2147467259.
Thanks for the suggestion.
It worked after I added the middle line. Thanks again.
set prop = ActiveDocument.Variables("var1").GetProperties
prop.Name = "var2"
ActiveDocument.Variables("var2").SetProperties prop