Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing selections between Opened Documents

Hi

I connected two documents by creating a button with action "Open URL" (qvp://<server>/<docName> ) - it works fine.

I want to pass the selections between these documents (like in the Open Document action).

When I tried to put the URL in the Open Document action - it failed (document was not found)

Is there any way to pass selections between two chained documents which are opened in server?

Thanks

Yaniv

11 Replies
Anonymous
Not applicable
Author

Hi Jagan

Should it also work when I am opening a document via QVS (qvp://<server>/filename.qvw) ?

thanks

Yaniv

Anonymous
Not applicable
Author

OK, after a quick experience with the API guide I found the solution.

The Action is not working so we'll have to do it with Macro.

The idea is to loop through all the current selections and dynamically pass them to the new document:

set App = ActiveDocument.GetApplication

set newdoc = App.OpenDoc ("qvp://<SERVER>/<DOCUMENT>.qvw")

set x = ActiveDocument.GetCurrentSelections

s = x.Selections

v = x.VarId

for i = lbound(s) to ubound(s)


    newdoc.Fields(v(i)).Select s(i)


next