Support 1

Every script must contain a Main subroutine – the Formativ IDE automatically inserts one when you create a new applet.

I think the source code you are looking for will be something like:

Sub Main(Client, GWEvent)

  dim oPortal
  dim oPortals

  set oPortals = GroupWise.PortalManager.Portals
  set oPortal = oPortals.Item("MyCompany")

  if oPortal is nothing Then
    set oPortal = oPortals.Add
    oPortal.Caption = "My Company"
    oPortal.TabCaption = "My Company"
    oPortal.ID = "MyCompany"
    oPortal.NavigationControlsEnabled = false
    oPortal.URLInputEnabled = false
  end If
  oPortal.Url = "http://intranet"
  oPortals.ActivePortal = oPortal.ID

  set oPortal = nothing
  set oPortals = nothing

End Sub

Advansys Support