Warning: This file has been marked up for HTML
VERSION 4.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4140
ClientLeft = 6600
ClientTop = 5475
ClientWidth = 6690
Height = 4545
Left = 6540
LinkTopic = "Form1"
ScaleHeight = 4140
ScaleWidth = 6690
Top = 5130
Width = 6810
Begin VB.TextBox Text6
Height = 735
Left = 2040
TabIndex = 8
Text = "Text6"
Top = 2880
Width = 2775
End
Begin VB.CommandButton Command3
Caption = "New"
Height = 735
Left = 240
TabIndex = 7
Top = 2880
Width = 1455
End
Begin VB.TextBox Text5
Height = 615
Left = 5280
TabIndex = 6
Text = "Text5"
Top = 1800
Width = 1215
End
Begin VB.TextBox Text4
Height = 735
Left = 2040
TabIndex = 5
Text = "Text4"
Top = 1800
Width = 2775
End
Begin VB.CommandButton Command2
Caption = "Mail"
Height = 735
Left = 240
TabIndex = 4
Top = 1800
Width = 1455
End
Begin VB.TextBox Text3
Height = 735
Left = 5280
TabIndex = 3
Text = "Text3"
Top = 840
Width = 1215
End
Begin VB.TextBox Text2
Height = 735
Left = 2040
TabIndex = 2
Text = "Text2"
Top = 840
Width = 2775
End
Begin VB.CommandButton Command1
Caption = "Folders"
Height = 735
Left = 240
TabIndex = 1
Top = 840
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 0
Text = "Text1"
Top = 240
Width = 3375
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
'/***************************************************************************
'$name: BS1.FRM
'$version: 1.0
'$date_modified: 121298
'$description: Visual Basic form file
'$owner: GroupWise SDK Team Lead
'Copyright (c) 1998 Novell, Inc. All Rights Reserved.
'
'THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
'USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE LICENSE AGREEMENT
'ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT (SDK) THAT CONTAINS THIS WORK.
'PURSUANT TO THE SDK LICENSE AGREEMENT, NOVELL HEREBY GRANTS TO DEVELOPER A
'ROYALTY-FREE, NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL'S SAMPLE CODE IN ITS
'PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS TO MARKET,
'DISTRIBUTE, OR SELL NOVELL'S SAMPLE CODE AS A COMPONENT OF DEVELOPER'S
'PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO DEVELOPER OR DEVELOPER'S
'CUSTOMERS WITH RESPECT TO THIS CODE.
'****************************************************************************/
Dim oApp As Object
Dim oAcct As Object
'Get name of root folder.
'Count all folders in root folder and display count.
'
'
Private Sub Command1_Click()
Dim oFolders As Object
Dim oFolder As Object
Dim Cnt As Integer
Text2.Text = oAcct.RootFolder.Name
Set oFolders = oAcct.AllFolders
Cnt = 0
For Each oFolder In oFolders
If oFolder.ObjType = egwQuery Then
Cnt = Cnt + 1
End If
Next
Text3.Text = Cnt
End Sub
'Find MailBox folder.
'Count all draft messages in the MailBox.
'Display Subject for each message as it is found
'Display final count
'
Private Sub Command2_Click()
Dim oFolder As Object
Dim oMessages As Object
Dim oMessage As Object
Dim Cnt As Integer
Set oFolder = oAcct.MailBox
Set oMessages = oFolder.Messages
Cnt = 0
For Each oMessage In oMessages
If oMessage.BoxType = egwDraft Then
Cnt = Cnt + 1
Text4.Text = oMessage.Subject
End If
Next
Text5.Text = Cnt
End Sub
'Find MailBox folder
'Create a new draft message
'Set the subject, for the new message, form Text6
'
Private Sub Command3_Click()
Dim oMessages As Object
Dim oMessage As Object
Set oMessages = oAcct.MailBox.Messages
Set oMessage = oMessages.Add()
oMessage.Subject = Text6.Text
End Sub
'Create new object
'Login to GroupWise and get Account Object
'Check for remote operation and display results
'
Private Sub Form_Load()
Set oApp = CreateObject("NovellGroupWareSession")
Set oAcct = oApp.Login("", "")
If oAcct.Remote = True Then
Text1.Text = "Remote"
Else
Text1.Text = "Connected"
End If
End Sub