Syntax for SavePICT/SNAP?

I am trying to capture a panel to the Picture Gallery (and then copy it from the Picture Gallery to a notebook). The following command fails within a function call:

SavePICT/SNAP=1/O/WIN=thegraphic/P=_PictGallery_ as thegraphic


where thegraphic is a string variable that has the name of the panel. The error I get is No Target Window. The alternative below gives a syntax error at run time

SavePICT/SNAP=1/O/WIN=$thegraphic/P=_PictGallery_ as thegraphic


This is Igor 6.22A on Mac 10.6.8.
OK. Got it!

SavePICT/SNAP=1/O/WIN=$thegraphic/P=_PictGallery_/E=-5 as thegraphic


Adding the /E flag fixed the problem.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville