/ Forums / Advansys Formativ / Creating Solutions with Formativ / Using GroupWise.CloseWindow() to close a message window / Reply To: Using GroupWise.CloseWindow() to close a message window

#7751
Support 3
Participant

Groupwise.CloseWindow() closes the current window. You need to make sure when calling this method, the e-mail message window is the activate the window. Here is a sample code to set the e-mail message as active window:

  
  iHandle = Utilities.FindWindow("OFMailView","")
  if (iHandle > 0) then
    utilities.SetForegroundWindow(iHandle)
    GroupWise.CloseWindow()
  end if

Please note, attempting to close GroupWise from a C3PO (i.e. Formativ) either did not work or resulted in unpredictable behavior. See the forum post “How to shut down GroupWise?” for more information.

Regards,
Advansys Support