Document.BeforeDoubleClick Event

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Occurs when the editing area of the document window is double-clicked, before the default double-click action.

Namespace:  Microsoft.Office.Tools.Word
Assemblies:   Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

event ClickEventHandler BeforeDoubleClick

To prevent the default double-click action from occurring, set the Cancel argument of the provided CancelEventArgs object to true.

The following code example displays a message when you double-click the document. This example is for an application-level add-in.

private void DocumentBeforeDoubleClick()
    Document vstoDoc = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
    vstoDoc.BeforeDoubleClick += new Microsoft.Office.Tools.Word.ClickEventHandler(ThisDocument_BeforeDoubleClick);            

void ThisDocument_BeforeDoubleClick(object sender, Microsoft.Office.Tools.Word.ClickEventArgs e)
    Document vstoDoc = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
    System.Windows.Forms.MessageBox.Show(vstoDoc.Name + " was double-clicked.");

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft