Support 1a

This should be possible using the NativeInterface property of a portal. The nativeInterface property gives you the IWebBrowser2 interface for the portal, which in tern has an ExecWB() method. You can use this method to print the contents of the portal.

Here’s an example:

Sub Main(Client, GWEvent)

   dim iPortals
   dim iPortal1
   dim iret

   Set iPortals = GroupWise.PortalManager.Portals
   Set iPortal1 = iPortals.Item("PORTAL1")

   If iPortal1 is Nothing Then
     Set iPortal1 = iPortals.Add
     iPortal1.Caption = "Advansys Home"
     iPortal1.TabCaption = "Advansys"
     iPortal1.ID = "PORTAL1"
     iPortal1.NavigationControlsEnabled = True
     iPortal1.URLInputEnabled = True
     iPortal1.Url = "www.advansyscorp.com"
     MsgBox "Found it - try to print it"
     const IDM_PRINT = 6
     call iPortal1.NativeInterface.ExecWB(IDM_PRINT, -1)
   End If

End Sub

This is somewhat incomplete, because the printer selection dialog still appears. I understand it should be possible to turn this off by using flags. See the Microsoft Documentation on the IWebBrowser2.ExecWB() method, and the IDM_PRINT command. More information is available at http://msdn.microsoft.com/workshop/browser/mshtml/reference/constants/idm_print.asp.

I hope this helps.

Advansys Support