4 Replies Latest reply: Sep 23, 2009 7:12 PM by Suky Dhak RSS

    Clearing selection and setting sheet on Publisher reload (qv9)

    stevevega

      Hi There,

      I am looking to get selections cleared and default page set when publisher reloads data, as presently if the document is saved with selections by mistake that default selection persists until someone sorts it out.

      I have attempted a solution that goes like this:

      Created a variable osUser, with a value of =OSUser()
      Set OnPostReload event to fire PublisherClearSelections
      Created the macro PublisherClearSelections as below


      sub PublisherClearSelections
      vOSUser = ActiveDocument.GetVariable("osUser").GetContent.string

      if instr(vOSUser, "QVPublisher") > 0 then
      ActiveDocument.ClearAll
      ActiveDocument.ActivateSheet("Home")
      end if
      end sub


      This works fine in QV Developer, but doesn't seem to work when kicked off by Publisher. I am reasonably confident in the OSUser name being right for our environment.

      I would have expected a way of doing this in the Reload script, rather than relying on a trigger occurring, but I have not found a way of doing this.

      Any suggestions welcome.

      Thanks,
      Steve