Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone have a working example of how to read parameters from a url. I have seen several posts with code like the below but it isn't working for me. I have the below code on the OnOpen event.
The url: http://us5076webd/QvPlugin/opendoc.htm?document=AP%20Published/test.qvw?F1=5
set
end
sub myCurrency = ActiveDocument.GetVariable("F1").GetContent. StringCan anyone help?
Thanks
Is F1 predefined in the document? You must predefine variables to be able to receive them as parameters.
-Rob
I have modified my code because initially I had F1 as a field and variable. I changed it to :
set myVar = ActiveDocument.Variables("Var1").GetContent.String
set TgtCurr = ActiveDocument.GetField("F1")
TgtCurr.Select myVar
Under Settings Variable Overview, I added variables for both myVar and Var1.
When I run the above, I get:
Macro parse failed. Functionality was lost
SelectDefaultSettings
Error: Object required: '[string: "2"]'
Any other ideas?
Remove "set" from "set myVar....".
Set is only used when the function returns a type of Object.
-Rob