Novell is now a part of Micro Focus

Using OCX/ActiveX in GroupWise 5

Articles and Tips: article

JIM KNOWLTON
Technical Writer
GroupWare Division

01 Sep 1996


Explains how GroupWise 5 and OLE let you embed Address Book and Name Completion OCX/ActiveX (OLE) controls in your solution

Introduction

GroupWise 5 and OLE let you embed Address Book and Name Completion OCX/ActiveX (OLE) controls in your solution. You can also customize how your solution obtains contact information from Address Book. This article explains how.

Address Book OCX

The Address Book OCX allows you to integrate the GroupWise address book into your custom messaging solution.

Environment

The Address Book OCX can be used in a development environment that can build OLE Control containers such as Delphi 2.0, Visual Basic 4.0 (VB), and Visual C++.

From C, C++, VB, or Delphi 32 bit, access GroupWise services and the data store using OCXs.

Make sure the Address Book OCX and the Address Book are the same version by updating the OCX when you update the Address Book.

Properties

Properties control your OCX button and the Address


AddDlg

Boolean

AddressBook

Enumerated

AddressBookName

Text

AddressList

Enumerated

AllowAddressListClose

Boolean

AllowAddressListOpen

Boolean

BackColor

COLORREF

BitmapPosition

Enumerated

BorderStyle

Enumerated

ButtonBitmap

Enumerated

Cancel

Boolean

Caption

Text

CaptionPosition

Enumerated

Close

Text

Default

Boolean

DisplayType

Enumerated

DlgCaption

Text

DontUpdateOnExit

Boolean

DragIcon

ICON

DragMode

Enumerated

DrawItemTypeBitmaps

Boolean

Enabled

Boolean

Exit

Text

Font

FONT

Font3D

Enumerated

ForeColor

COLORREF

GenericAddressList

Boolean

Height

short

HelpContextID

short

Index

short

Left

short

Name

Text

ReturnAddress

Enumerated

SavedPosition

Boolean

Select

Enumerated

ShowButtons

Enumerated

TabIndex

short

TabStop

Boolean

Tag

Top

short

UpdateOnClose

Boolean

Visible

Boolean

WhatsThisHelpID

short

Width

short

Events

Events control what happens when Address Book users make selections in the User Interface. Click( )

Methods

Methods let you obtain information for your solution about an Address Book contact. All BSTR methods use (short index).


Method

Information Obtained

Short Count( );

Filled fields count

BSTR Address( );

Postal address

BSTR CellularPhoneNumber( );

Cellular phone

BSTR City( );

City

BSTR Comment( );

User comments

BSTR CompanyName( );

Organization

BSTR Country( );

Country

BSTR Department( );

Organization department

BSTR DisplayName( );

Displayed name

BSTR EMailAddress( );

E Mail ID

BSTR EMailType( );

E Mail system

BSTR FaxNumber( );

Fax

BSTR Greeting( );

Default opening text

BSTR HomePhoneNumber( );

Home phone

BSTR MailStop( );

Office internal location

BSTR OfficePhoneNumber( );

Office phone

BSTR State( );

State

BSTR Title( );

Job title

BSTR ZipCode( );

ZIP code

For extensive code samples of the Address Book OCX, refer to the GroupWise section of the Novell SDK CD.

GroupWise 5 Name Completion OCX

GroupWise 5 and OLE let you embed a Name Completion OCX in your solution. This allows users to type a portion of a name in the Address Book and have the name come up.

Environment

The Name Completion OCX can be used in a development environment that can build OLE Control containers, such as C, C++, Delphi 32 bit, or Visual Basic 4.0.

Constants

Constants define specific values to allow you to control your OCX button and the Name Completion UI.

AddressListConstants 0 DontShow 1 ShowPopup 2 ShowStatic

DefaultTargetTypeConstants 0 To 1 Cc 2 Bc

SearchAddressBookConstants 0 Default 1 spf

SearchItemConstants 0 All 1 Person 2 Company 3 Resource 4 PersonAndCompany 5 PersonAndResource

TargetTypeConstants 0 eTargetType_All 1 eTargetType_To 2 eTargetType_Cc 3 eTargetType_Bc

Properties

Properties control your OCX button and the Name Completion UI.

BackColor BeepOnUnknownAddress DefaultTargetType DragIcon DragMode Enabled Font Height HelpContextID Index Left Name ReturnAllFields SearchAddressBook SearchItem ShowAddressBookButton ShowAddressList TabIndex TabStop Tag Top Visible WhatsThisHelpID Width

Methods

Methods let you obtain information for your solution about an Address Book contact.


Use
To obtain contacts

Short Count(short index);

Filled fields count

BSTR Address(short index );

Postal address

BSTR CellularPhoneNumber(short index );

Cellular phone

BSTR City(short index );

City

BSTR Comment(short index );

User comments

BSTR CompanyName(short index );

Organization

BSTR Country(short index );

Country

BSTR Department(short index );

Organization department

BSTR DisplayName(short index );

Displayed name

BSTR EmailAddress(short index );

E Mail ID

BSTR EmailType(short index );

E Mail system

BSTR FaxNumber(short index );

Fax

BSTR Greeting(short index );

Default opening text

BSTR HomePhoneNumber(short index );

Home phone

BSTR MailStop(short index );

Office internal location

BSTR OfficePhoneNumber(short index );

Office phone

BSTR State(short index );

State

BSTR Title(short index );

Job title

BSTR ZipCode(short index );

ZIP code

Void Clear();

BOOL Add (LPCTSTR szDisplayName, LPCTSTR szEMailAddress, LPCTSTR szEMailAddressType);

For extensive code samples of the Address Book OCX, refer to the GroupWise section of the Novell SDK CD.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates