Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
does anyone know if exists the possibility of setting the read-only property for a Input box variable object via macro?
I'm creating automatically a set of variables and some of them must be read-only. The dialog property allow this but API documentation seems excluding this feature for Inputbox.
Both
boxprop.Layout.MemberAttributes.Item(0).ReadOnly = true
and
boxprop.Layout.ReadOnly = true
are stated as not correct
Thanks in advance
Luca
It is kind of hidden in the API Guide, but it is possible.
Here is the code to change a variable to Read-only:
set v = ActiveDocument.Variables("vVariable")
prop = v.GetProperties
prop.ConstraintsFlag = 4 'Read-only
v.SetProperties prop
It is kind of hidden in the API Guide, but it is possible.
Here is the code to change a variable to Read-only:
set v = ActiveDocument.Variables("vVariable")
prop = v.GetProperties
prop.ConstraintsFlag = 4 'Read-only
v.SetProperties prop
Solved, thanks
Hi NMiller,
it's just the solution I've found (in the same time of you).
Thanks a lot!
Luca