Recreating a Window Using WinRecreation

My problem is simple. I want to create a copy of one of my graphs, but without buttons, listboxes and other paraphernalia. My approach is to first create a window recreation macro:

String WinRecreationString=WinRecreation(, 0)

and then remove the unwanted lines from the macro:

WinRecreationString=GrepList(WinRecreationString, "^\t(SetWindow|Cursor|ListBox|CheckBox|PopupMenu|ValDisplay|SetVariable|Button|ShowInfo)", 1, "\r")

However, the resulting string is often longer than 400 characters, which means I cannot simply do Execute WinRecreationString. Is there a way to save the full string as a macro and then execute the macro, or am I forced to chop the string up and execute it piece by piece?
Something like the following should do the trick?

Function DoStuff()
    string/G macr = Winrecreation(S_name, 0)
    Execute/P/Q "Execute macr"
    Execute/P/Q "KillStrings/Z macr"

Another solution is to execute the macro's contents line by line. This can be fragile depending on the complexity of the graph.