Enhancing Your Office Documents with Novell ActiveX Controls
Articles and Tips: tip
Novell Developer Support
01 Feb 2001
You can use Novell ActiveX controls to retrieve NetWare information and display or process it in your Microsoft Office documents. For example, here's how to get NDS information into a MS Word document. However, this procedure can easily be applied to Excel, Access, PowerPoint, or other applications.
ActiveX controls (download from http://developer.novell.com/ndk/ocx.htm)
The steps you need to perform:
Enable the control toolbox (View/Toolbars/Control Toolbox).
From the toolbox, select the Novell Directory Control (More Controls/Novell Directory Control) and place it anywhere in your document.
For testing, add a command button and a Textbox from the Toolbar to your document.
Add the VB code to get the information you need. Double-click the new button, and complete the code so that it reads:
Private Sub CommandButton1_Click() TextBox1.Text = NWDir1.LoginName End Sub
Now you can minimize or close the VB window and leave the application design mode by clicking the Toolbar button "Exit Design Mode."
Test the code by pressing the new button in the document.
It's as easy as that. You want more? OK, lets get a list of NDS users: Re-enter design mode, add a listbox and, after double-clicking the button once more, change your previous code to:
Private Sub CommandButton1_Click() TextBox1.Text = NWDir1.LoginName For Each Entry In NWDir1.Entries ListBox1.AddItem (Entry.layout.Name + ": " + Entry.ShortName) Next End Sub
While the above tests don't do much to enhance your document, you'll probably think of something more useful, such as reading default values into forms, creating NDS reports for your company, creating new users, or sending GroupWise mail from your application.
* Originally published in Novell AppNotes
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.