Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have created a variable for company and I also created a button to pass this variable to micro in my application. I couldn't pass this variable to macro when I click on button.
Please provide macro to pass a variable and suggest solution on this.
Many thanks in advance.
Try like:
set v = ActiveDocument.GetVariable("vMyVariable")
Hi Amit,
I already tried this but it was not working...
Hi,
i use a function as follows:
'Function declaration
FUNCTION getVariableValue(varName)
set v = ActiveDocument.Variables(varName)
getVariableValue = v.GetContent.String
END FUNCTION
'Function use example
sub x
myVarValue = getVariableValue("v.MyVarName")
msgbox myVarValue
end sub
Please let me know if this helps.
Kind regards,
This function helped me. Thanks!