Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Not sure why I can't find this but I need to create a macro that will return all the variable names in a document.
Anybody know how to do this?
Thanks
Mark
You should use this function GetVariableDescriptions in your macro. You can find it in the APIGuide.qvw
Example in the APIGuide.qvw :
rem ** Show name of all variables in document **
set vars = ActiveDocument.GetVariableDescriptions
for i = 0 to vars.Count - 1
set v = vars.Item(i)
msgbox(v.Name)
next
You should use this function GetVariableDescriptions in your macro. You can find it in the APIGuide.qvw
Example in the APIGuide.qvw :
rem ** Show name of all variables in document **
set vars = ActiveDocument.GetVariableDescriptions
for i = 0 to vars.Count - 1
set v = vars.Item(i)
msgbox(v.Name)
next
Sometimes I can look at that API app all day and not find what was starring me in the face!
Thanks!
Mark