by Nissy Abraham, Developer, MOSMAR

The previous versions of iManage up to 9.x provided us with the ability to add dll references for iManage which enabled us to customise word in VBA to use iManage functionalities. We could capture iManage events in Word VBA using the corresponding references.  But this is not the case in Work 10, where there is no possibility to get those Worksite events and properties in VBA unless through the plugins and RESTAPI’s.

The iManage Work extensibility framework enables you to create .NET plugins for iManage Work 10 for Office.  Using these plugins, you can extend and customize the functionality of the iManage Work 10 for Office add-in.

iManage Work 10 for Office plugins are .NET assemblies loaded by the iManage Work 10 for Office add-in to extend and customise its functionality.  The plugins are downloaded automatically from the Work 10 application Server for each distribution. They can catch the events when an action is performed on the application or a form is about to load, modify the document metadata, retrieve the Office document object, and so on.

Creating a Sample Plugin for Microsoft Word

Sample: Hello World

This plugin displays a “Hello World” message whenever Microsoft Word starts.

  1. Install iManage Work 10 for Office (version 10.0.1 or later).
  2. In Microsoft Visual Studio, create a new Visual C# project with unique Class Library (.NET Framework) namespace, for example,
  3. Add references to iManage Work 10 for Office libraries iwto.dll and IWInterfaces.dl. These DLLs are available in the install directory of iManage Work 10 for Office.
  4. Add a reference to System.Windows.Form under Work10OfficePlugin by right-clicking
    1. References-> Add Reference ->Assemblies ->Framework ->select System.Windows.Forms.
  5. Rename the default C# file cs to HelloWorld.cs
  6. Create a .NET class for the plugin in cs, for example, WordPlugin1. This class must derive from iManage.Work.Tools.PlugInBase

Include the following in the plugin host event in the Initialize method.

HelloWorld.cs

 using System;

using iManage.Work.Tools;

namespace Work10OfficePlugins

{

public class WordPlugin1 : PlugInBase

{

public override bool Initialize(IPlugInHost host)

{

PlugInHost = host;

PlugInId = “myId”;

host.Startup += this.onStartup;

return true;

}

private void onStartup(object sender, EventArgs args)

{

System.Windows.Forms.MessageBox.Show(“Hello World!”);

}

}

}

Sideload the plugin in the Development environment:

  1. Create a resource file by right-clicking the project txt by right-clicking the project Work10OfficePlugins-> Add -> New Item -> Text File -> Add.
  2. Specify the MAC address of the development machine. Up to 20 MAC addresses can be provided in this config file.
  3. Right-click sideload_config.txt and select ->Properties -> Build Action -> Embedded Resource

sideload_config.txt

{

data: {

“macaddresses” : [ “00-0C-29-D4-BD-92”, “C1-12-83-07-3D-4C” ]

}

}

 

  1. Digitally sign the assembly:
  2. Right click the project Work10OfficePlugins -> Properties -> Signing -> Sign the assembly ->. Choose a strong name key file ->  New
  3. Add a Key file name of your choice, for example, plugin
  4. Protect my key file with a password
  5. Enter a password and select OK
  6. Build the project by right-clicking the Work10OfficePlugins project and selecting Build. Ensure that there are no errors in the build.
  7. Navigate to the project directory where the compiled assembly Work10OfficePlugins.dll is.
  8. Copy Work10OfficePlugins.dll to %localappdata%/iManage/Work/plug_ins.If the plug_ins directory is not available, create it and then copy the assembly into it.
  9. Register the plugin:
  10. Add the wplugins.manifest file by right-clicking Work10OfficePlugins and selecting Add -> New Item-> Application Manifest File -> Add
  11. Add the following assembly details in the wplugins.manifest file

 wplugins.manifest

<?xml version=”1.0″ encoding=”utf-8″ ?>

<configuration>

<word>

<entrypoints>

<entrypoint class=”Work10OfficePlugins.WordPlugin1″ resource=”

Work10OfficePlugins.sideload_config.txt”>

<assemblyIdentity name=”Work10OfficePlugins” version=”1.0.0.0″

publicKeyToken=”” language=”neutral” processorArchitecture=”msil” />

<provider name=”iManage”>iManage Office Plug In #1</provider>

</entrypoint>

</entrypoints>

</word>

</configuration>

  1. Copy the file to wplugins.manifest %localappdata%/iManage/Work/plug_ins.
  2. Start Microsoft Word. The “Hello World ” message is displayed.

Deploying the plugins

In the development environment, plugins are loaded to iManage Work Server using a sideloading mechanism as shown in the above example. Sideloaded plugins are authorized to run on up to twenty computers, identified by the MAC addresses of their network cards

In the production environment, the plugins can be registered and uploaded to iManage Work Server by the administrator using REST APIs or iManage Control Center

Using iManage Control Center

iManage Control Center (iCC) enables the administrators to upload iManage Work for Office plugins to iManage Work Server.

The developer creates a zip file which contains the plugin assembly files and manifest file and sends it to the administrator. Using iCC application, the administrator defines security settings on the plugin, and uploads it to iManage Work Server.

Creating Manifest File

You need to provide the information about your Office plugin to iManage Work server in file manifest.yaml. Identify a unique ID for your plugin and create the following manifest file in the YAML format as

manifest.yaml

# Information about Office plugin

id:           UniqueIDForMyProject

name:         Sample Office plugin

publisher:    XYZ Inc.

version:      ‘1’

# Name of the extensions

desktop_extensions:

– iwtoTestPlugIn.WordPlugin

– iwtoTestPlugIn.ExcelPlugIn

– iwtoTestPlugIn.PowerPointPlugIn

– iwtoTestPlugIn.OutlookPlugI

 

iManage Work REST APIs

The iManage Work REST APIs enable users to perform operations such as viewing documents, browsing workspaces, and searching for documents on the iManage Work server through the HTTP protocol. Several operations that are performed through the iManage Desktop client applications can be performed and/or automated using iManage Work REST APIs.

More information regarding Work 10 upgrade is available from

https://imanage.com/support

 

Need Help?

Please get in touch with MOSMAR should you need any help with your Work 10 upgrade.

We have years of experience with this product and know the intricate details of how to go about your upgrade.

Feature Changes

  • iManage Work10 integration
    • Save to Workspace
    • Precedent Bank
    • Email Precedent Bank
    • Clause Bank

    • Clause Bank – build on your document by inserting DocAssist clauses[/caption]
  • Certain Contact attributes can now be read only – both across standard Contact fields (ie First Name, Last Name) and extended data fields (inside the data XML)
  • Enable the removal of the Sign button from the DocAssist pane if not required at a particular site
  • Modify Gender field in Contact table to accept more than 2 characters
  • DocAssist prompt pane will now always refresh correctly to show user controls and date controls
  • Add Contact dialog updated so that users are always able to get multiple lines into the Address box
  • Enable users to action lowest level dialog without dialogs overlapping
  • Enable Edit Contact form on high DPI monitors (over 100%)
  • Renaming content controls dialog will always apply the changes
  • Improve the speed in which money controls apply calculations
  • Precedent Bank no longer forces the initial save
  • iManage profile no longer returns “0” when the Addressee of the document is blank
© Copyright - Mosmar