Macro interface members

The following interface members can be used to build macro-enabled templates for WorkZone for Word:

Macro interface member

Description

String ShowCaseCreateDialog()

Displays the Create Case dialog box. Returns the key of a created case or null.

String ShowCaseSearchDialog()

Displays the Search Case dialog box. Returns the key of a selected case or null.

String ShowDocumentOpenDialog()

Displays the Document Open dialog box. Returns the key of an open document or null.

Bool RegistrationPaneVisible { get; set; }

True in order to display the Registration pane; otherwise False.

Void ShowDocumentPartiesDialog()

Displays the Add Document References dialog box. You can manage the document references interactively. All changes made in the dialog are saved to the current document.

Void ShowDocumentRecipientsDialog()

Displays the Add Recipients dialog box. You can manage the document recipients interactively. All changes made in the dialog box are saved to the current document.

Void SetDocumentMetadata (string key, object value)

Sets document meta data (for example, Title, Document Type, Document Group, Case Handler, Parties, Document References, and so on).

Object GetDocumentMetadata (string key)

Gets current document meta data (including document number, parties document references, and so on).

Void AddDocumentParty (string addressKey, string partyRole)

Adds the corresponding contact of specified addressKey as a document party.

Void AddDocumentReference (string documentKey, string documentRole)

Adds the document reference to the document, identified by documentKey to the current document.

Void Merge()

Perform merge to content controls.

String SaveDocument()

Saves the current document. Returns ID of the saved document.

Void AttachDocumentToCase (string caseKey)

Attaches the document to a specific case, and show the Registration pane if it is not visible.

String GetODataEndpointAddress()

Turns current endpoint address for OData services.

Bool IsMergedDocument { get; set; }

True if this document is created in the process of merging to multiple recipients; otherwise False.

Before_Merge (bool Cancel)

The member notifies that the merging starts. Set the Cancel parameter to True if you want to cancel the merging. The member is used for a specific document only.

To use the member, VBA must subscribe to it by using this method: RegisterCallbackOnActiveDocument(string callbackMethod, object callbackOwner), where callbackMethod stands for Before_Merge and callbackOwner stands for a VBA module where Before_Merge is declared.

To unsubscribe, use this method: UnregisterCallbackOnActiveDocument(string callbackMethod, object callbackOwner). These methods are applied to the active document.

After_Merge (int RecordKey, int FileKey)

The member notifies that the merging ends and provides case and document IDs of the merged document.

To use the member, VBA must subscribe to it by using this method: RegisterCallbackOnActiveDocument(string callbackMethod, object callbackOwner), where callbackMethod stands for After_Merge and callbackOwner stands for VBA module where After_Merge is declared.

To unsubscribe, use this method: UnregisterCallbackOnActiveDocument(string callbackMethod, object callbackOwner). These methods are applied to the active document.

bool WorkZone_BeforeMerge (string id)

Use it as the alternative to Before_Merge or use both members simultaneously. In contrast to Before_Merge, WorkZone_BeforeMerge applies globally within the WorkZone for Office add-in and doesn't require registration. If True, merging is cancelled. If False, merging starts.

WorkZone_AfterMerge(string id)

Use it as the alternative to After_Merge or use both members simultaneously. In contrast to After_Merge, WorkZone_BeforeMerge applies globally within the WorkZone for Office add-in and doesn't require registration.

Important: All possible key values for your documents are defined in the ColumnSetDefinitions file. You can edit them according to your needs. See Customize view and dialog boxes.