Export (0) Print
Expand All

ActionsPane Interface

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

Represents a custom user interface for the Document Actions task pane in a document-level customization for Word or Excel.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

[GuidAttribute("b835a67a-c3c0-45ba-9a3f-c878bf531dd5")]
public interface ActionsPane : IDisposable

The ActionsPane type exposes the following members.

  NameDescription
Public propertyAccessibilityObjectGets the AccessibleObject that is assigned to the actions pane.
Public propertyAccessibleDefaultActionDescriptionGets or sets the default action description of the actions pane. This description is used by accessibility client applications.
Public propertyAccessibleDescriptionGets or sets the accessible description of the actions pane. This description is used by accessibility client applications.
Public propertyAccessibleNameGets or sets the accessible name of the actions pane. This name is used by accessibility client applications.
Public propertyAccessibleRoleGets or sets the accessible role of the actions pane.
Public propertyActiveControlGets or sets the active control on the actions pane.
Public propertyAllowDropGets or sets a value that indicates whether the actions pane can accept data that the user drags onto it.
Public propertyAnchorGets or sets the edges of the container to which the actions pane is bound and determines how the user control is resized with its parent.
Public propertyAutoRecoverGets or sets a value that indicates whether the actions pane solution automatically re-attaches to the document when it is detached.
Public propertyAutoScaleDimensionsGets or sets the dimensions that the actions pane was designed to.
Public propertyAutoScaleModeGets or sets the automatic scaling mode of the actions pane.
Public propertyAutoScrollGets or sets a value indicating whether the actions pane enables the user to scroll to any controls placed outside of its visible boundaries.
Public propertyAutoScrollMarginGets or sets the size of the auto-scroll margin for the actions pane.
Public propertyAutoScrollMinSizeGets or sets the minimum size of the auto-scroll for the actions pane.
Public propertyAutoScrollOffsetGets or sets where the actions pane is scrolled to when the ScrollControlIntoView method is called.
Public propertyAutoScrollPositionGets or sets the location of the auto-scroll position for the actions pane.
Public propertyAutoSizeInfrastructure. This property is not supported by the actions pane.
Public propertyAutoSizeModeGets or sets the mode by which the actions pane control automatically resizes itself.
Public propertyAutoValidateGets or sets a value that indicates whether controls in the actions pane will be automatically validated when the focus changes.
Public propertyBackColorGets or sets the background color for the actions pane.
Public propertyBackgroundImageGets or sets the background image displayed in the actions pane.
Public propertyBackgroundImageLayoutGets or sets the position and behavior of a background image in the actions pane.
Public propertyBindingContextGets or sets an object that is used to keep all controls on the actions pane that are bound to the same data source synchronized.
Public propertyBorderStyleGets or sets the border style of the actions pane.
Public propertyBottomGets the distance, in pixels, between the bottom edge of the actions pane and the top edge of its container's client area.
Public propertyBoundsGets or sets the size and location of the actions pane control including its nonclient elements, in pixels, relative to its parent.
Public propertyCanFocusGets a value indicating whether the actions pane can receive focus.
Public propertyCanSelectGets a value indicating whether the actions pane can be selected.
Public propertyCaptureGets or sets a value indicating whether the actions pane has captured the mouse.
Public propertyCausesValidationGets or sets a value indicating whether the actions pane causes validation to be performed on any controls that require validation when it receives focus.
Public propertyClientRectangleGets the rectangle that represents the client area of the actions pane.
Public propertyClientSizeGets or sets the height and width of the client area of the actions pane.
Public propertyCompanyNameGets the name of the company or creator of the application containing the actions pane.
Public propertyContainerInfrastructure. This property is not supported by the actions pane.
Public propertyContainsFocusGets a value indicating whether the actions pane, or one of its child controls, currently has the input focus.
Public propertyContextMenuGets or sets the shortcut menu associated with the actions pane.
Public propertyContextMenuStripGets or sets the ContextMenuStrip associated with the actions pane.
Public propertyControlsGets the collection of controls contained within the actions pane.
Public propertyCreatedGets a value indicating whether the actions pane has been created.
Public propertyCurrentAutoScaleDimensionsGets the current run-time dimensions of the screen.
Public propertyCursorGets or sets the cursor that is displayed when the mouse pointer is over the actions pane.
Public propertyDataBindingsGets the data bindings for the actions pane.
Public propertyDisplayRectangleGets the rectangle that represents the display area of the actions pane.
Public propertyDisposingGets a value indicating whether the actions pane is in the process of disposing.
Public propertyDockGets or sets which actions pane control borders are docked to its parent and determines how the actions pane control is resized with its parent.
Public propertyDockPaddingInfrastructure. This property is not supported by the actions pane.
Public propertyEnabledGets or sets a value indicating whether the actions pane can respond to user interaction.
Public propertyFocusedGets a value indicating whether the actions pane has input focus.
Public propertyFontGets or sets the font of the text displayed by the actions pane.
Public propertyForeColorGets or sets the foreground color of the actions pane.
Public propertyHandleGets the window handle that the actions pane control is bound to.
Public propertyHasChildrenGets a value that indicates whether the control contains one or more child controls.
Public propertyHeightGets or sets the height of the actions pane control.
Public propertyHorizontalScrollGets the characteristics associated with the horizontal scroll bar.
Public propertyImeModeGets or sets the Input Method Editor (IME) mode of the actions pane.
Public propertyInvokeRequiredGets a value indicating whether the caller must call an invoke method when making method calls to the actions pane control because the caller is on a different thread than the one the actions pane control was created on.
Public propertyIsAccessibleGets or sets a value that indicates whether the actions pane is visible to accessibility applications.
Public propertyIsDisposedGets a value that indicates whether the actions pane control has been disposed of.
Public propertyIsHandleCreatedGets a value that indicates whether the actions pane control has a handle associated with it.
Public propertyIsMirroredGets a value that indicates whether the actions pane is mirrored.
Public propertyLayoutEngineGets a cached instance of the actions pane control's layout engine.
Public propertyLeftGets or sets the distance, in pixels, between the left edge of the actions pane control and the left edge of its container's client area.
Public propertyLocationGets or sets the coordinates of the upper-left corner of the actions pane relative to the upper-left corner of its container.
Public propertyMarginGets or sets the space between controls.
Public propertyMaximumSizeGets or sets the size that is the upper limit that GetPreferredSize can specify.
Public propertyMinimumSizeGets or sets the size that is the lower limit that GetPreferredSize can specify.
Public propertyNameGets or sets the name of the actions pane control.
Public propertyOrientationGets a value that indicates whether the placement of the actions pane is vertical or horizontal.
Public propertyPaddingGets or sets padding within the actions pane.
Public propertyParentGets or sets the parent container of the actions pane.
Public propertyParentFormInfrastructure. This property is not supported by the actions pane.
Public propertyPreferredSizeGets the size of the rectangular area into which the actions pane can fit.
Public propertyProductNameGets the product name of the assembly that contains the actions pane.
Public propertyProductVersionGets the version of the assembly that contains the actions pane.
Public propertyRecreatingHandleGets a value that indicates whether the actions pane control is currently re-creating its handle.
Public propertyRegionGets or sets the window region associated with the actions pane.
Public propertyRightGets the distance, in pixels, between the right edge of the actions pane and the left edge of its container's client area.
Public propertyRightToLeftGets or sets a value indicating whether the actions pane's elements are aligned to support locales using right-to-left fonts.
Public propertySiteGets or sets the site of the actions pane.
Public propertySizeGets or sets the height and width of the actions pane control.
Public propertyStackOrderGets or sets a value that indicates the direction that the controls are stacked on the actions pane.
Public propertyTabIndexGets or sets the tab order of the actions pane within its container.
Public propertyTabStopGets or sets a value indicating whether the user can give the focus to the actions pane by using the TAB key.
Public propertyTagGets or sets the object that contains data about the actions pane.
Public propertyTextInfrastructure. This property is not supported by the actions pane.
Public propertyTopGets or sets the distance, in pixels, between the top edge of the actions pane control and the top edge of its container's client area.
Public propertyTopLevelControlInfrastructure. This property is not supported by the actions pane.
Public propertyUseWaitCursorGets or sets a value indicating whether to use the wait cursor for the actions pane and all child controls.
Public propertyVerticalScrollGets the characteristics associated with the vertical scroll bar.
Public propertyVisibleGets or sets a value that indicates whether the ActionsPane is visible.
Public propertyWidthGets or sets the width of the actions pane control.
Public propertyWindowTargetInfrastructure. This property is not supported by the actions pane.
Top

  NameDescription
Public methodBeginInitInfrastructure.
Public methodBeginInvoke(Delegate)Executes the specified delegate asynchronously on the thread that the actions pane control's underlying handle was created on.
Public methodBeginInvoke(Delegate, Object[])Executes the specified delegate asynchronously with the specified arguments, on the thread that the actions pane control's underlying handle was created on.
Public methodBringToFrontBrings the actions pane control to the front of the z-order.
Public methodClearDetaches the actions pane solution from the document.
Public methodContainsReturns a value that indicates whether the specified control is a child of the actions pane.
Public methodCreateControlForces the creation of the visible actions pane control, including the creation of the handle and any visible child controls.
Public methodCreateGraphicsCreates the Graphics for the actions pane control.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public methodDoDragDropBegins a drag-and-drop operation.
Public methodDrawToBitmapSupports rendering to the specified bitmap.
Public methodEndInitInfrastructure.
Public methodEndInvokeRetrieves the return value of the specified asynchronous operation.
Public methodFindFormRetrieves the form that the actions pane control is on.
Public methodFocusSets input focus to the actions pane.
Public methodGetChildAtPoint(Point)Retrieves the child control that is located at the specified coordinates.
Public methodGetChildAtPoint(Point, GetChildAtPointSkip)Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.
Public methodGetContainerControlReturns the next ContainerControl up the control's chain of parent controls.
Public methodGetNextControlRetrieves the next control forward or back in the tab order of child controls.
Public methodGetPreferredSizeRetrieves the size of a rectangular area into which the actions pane can be fitted.
Public methodHideRemoves the ActionsPane and the controls from the task pane user interface, but leaves the task pane visible.
Public methodInvalidate()Invalidates the entire surface of the actions pane and causes the actions pane to be redrawn.
Public methodInvalidate(Boolean)Invalidates the entire surface of the actions pane and causes a paint message to be sent to the actions pane. Optionally, invalidates the child controls assigned to the actions pane.
Public methodInvalidate(Rectangle)Invalidates the specified region of the actions pane (adds it to the actions pane's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the actions pane.
Public methodInvalidate(Region)Invalidates the specified region of the actions pane (adds it to the actions pane's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the actions pane.
Public methodInvalidate(Rectangle, Boolean)Invalidates the specified region of the actions pane (adds it to the actions pane's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the actions pane. Optionally, invalidates the child controls assigned to the actions pane.
Public methodInvalidate(Region, Boolean)Invalidates the specified region of the actions pane (adds it to the actions pane's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the actions pane. Optionally, invalidates the child controls assigned to the actions pane.
Public methodInvoke(Delegate)Executes the specified delegate on the thread that owns the actions pane's underlying window handle.
Public methodInvoke(Delegate, Object[])Executes the specified delegate, on the thread that owns the actions pane's underlying window handle, with the specified list of arguments.
Public methodPerformAutoScalePerforms scaling of the actions pane and its children.
Public methodPerformLayout()Forces the actions pane to apply layout logic to all its child controls.
Public methodPerformLayout(Control, String)Forces the actions pane to apply layout logic to all its child controls.
Public methodPointToClientComputes the location of the specified screen point into client coordinates.
Public methodPointToScreenComputes the location of the specified client point into screen coordinates.
Public methodPreProcessControlMessagePreprocesses keyboard or input messages within the message loop before they are dispatched.
Public methodPreProcessMessagePreprocesses keyboard or input messages within the message loop before they are dispatched.
Public methodRectangleToClientComputes the size and location of the specified screen rectangle in client coordinates.
Public methodRectangleToScreenComputes the size and location of the specified client rectangle in screen coordinates.
Public methodRefreshForces the actions pane to invalidate its client area and immediately redraw itself and any child controls.
Public methodResetBackColorInfrastructure. This method is not supported by the actions pane.
Public methodResetBindingsInfrastructure. This method is not supported by the actions pane.
Public methodResetCursorInfrastructure. This method is not supported by the actions pane.
Public methodResetFontInfrastructure. This method is not supported by the actions pane.
Public methodResetForeColorInfrastructure. This method is not supported by the actions pane.
Public methodResetImeModeInfrastructure. This method is not supported by the actions pane.
Public methodResetRightToLeftInfrastructure. This method is not supported by the actions pane.
Public methodResetTextInfrastructure. This method is not supported by the actions pane.
Public methodResumeLayout()Resumes usual layout logic.
Public methodResumeLayout(Boolean)Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.
Public methodScaleScales the actions pane and all child controls by the specified scaling factor.
Public methodScrollControlIntoViewScrolls the specified child control into view.
Public methodSelectActivates the actions pane.
Public methodSelectNextControlActivates the next control.
Public methodSendToBackSends the actions pane control to the back of the z-order.
Public methodSetAutoScrollMarginSets the size of the auto-scroll margins.
Public methodSetBounds(Int32, Int32, Int32, Int32)Sets the bounds of the actions pane to the specified location and size.
Public methodSetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)Sets the specified bounds of the actions pane to the specified location and size.
Public methodShowDisplays the ActionsPane on the task pane, including all controls that have been added to the ActionsPane, but does not display the task pane if the task pane is not visible.
Public methodSuspendLayoutTemporarily suspends the layout logic for the actions pane.
Public methodUpdateCauses the actions pane to redraw the invalidated regions within its client area.
Public methodValidate()Verifies the contents of the actions pane by causing the Validating and Validated events to occur, in that order.
Public methodValidate(Boolean)Verifies the contents of the actions pane; conditionally dependent on whether automatic validation is turned on.
Public methodValidateChildren()Causes all of the child controls that support validation to validate their data.
Public methodValidateChildren(ValidationConstraints)Causes all of the child controls that support validation to validate their data.
Top

  NameDescription
Public eventAutoSizeChangedInfrastructure. This event is not supported by the actions pane.
Public eventAutoValidateChangedOccurs when the AutoValidate property changes.
Public eventBackColorChangedOccurs when the value of the BackColor property changes.
Public eventBackgroundImageChangedOccurs when the value of the BackgroundImage property changes.
Public eventBackgroundImageLayoutChangedOccurs when the BackgroundImageLayout property changes.
Public eventBindingContextChangedOccurs when the value of the BindingContext property changes.
Public eventCausesValidationChangedOccurs when the value of the CausesValidation property changes.
Public eventChangeUICuesOccurs when the focus or keyboard user interface (UI) cues change.
Public eventClickOccurs when the actions pane is clicked.
Public eventClientSizeChangedOccurs when the value of the ClientSize property changes.
Public eventContextMenuChangedOccurs when the value of the ContextMenu property changes.
Public eventContextMenuStripChangedOccurs when the value of the ContextMenuStrip property changes.
Public eventControlAddedOccurs when a new control is added to the Controls collection.
Public eventControlRemovedOccurs when a control is removed from the Controls collection.
Public eventCursorChangedOccurs when the value of the Cursor property changes.
Public eventDisposedOccurs when the actions pane is disposed.
Public eventDockChangedOccurs when the value of the Dock property changes.
Public eventDoubleClickOccurs when the actions pane is double-clicked.
Public eventDragDropOccurs when a drag-and-drop operation is completed.
Public eventDragEnterOccurs when an object is dragged into the actions pane's bounds.
Public eventDragLeaveOccurs when an object is dragged out of the actions pane's bounds.
Public eventDragOverOccurs when an object is dragged over the actions pane's bounds.
Public eventEnabledChangedOccurs when the Enabled property value has changed.
Public eventEnterOccurs when the actions pane is entered.
Public eventFontChangedOccurs when the Font property value changes.
Public eventForeColorChangedOccurs when the ForeColor property value changes.
Public eventGiveFeedbackOccurs during a drag operation.
Public eventGotFocusOccurs when the actions pane receives focus.
Public eventHandleCreatedOccurs when a handle is created for the actions pane.
Public eventHandleDestroyedOccurs when the actions pane's handle is in the process of being destroyed.
Public eventHelpRequestedOccurs when the user requests help for the actions pane.
Public eventImeModeChangedOccurs when the ImeMode property changes.
Public eventInvalidatedOccurs when the actions pane's display requires redrawing.
Public eventKeyDownOccurs when a key is pressed while the actions pane has focus.
Public eventKeyPressOccurs when a key is pressed while the actions pane has focus.
Public eventKeyUpOccurs when a key is released while the actions pane has focus.
Public eventLayoutOccurs when the actions pane should reposition its child controls.
Public eventLeaveOccurs when the input focus leaves the actions pane.
Public eventLoadOccurs before the actions pane becomes visible for the first time.
Public eventLocationChangedOccurs when the Location property value has changed.
Public eventLostFocusOccurs when the actions pane loses focus.
Public eventMarginChangedOccurs when the actions pane's margin changes.
Public eventMouseCaptureChangedOccurs when the actions pane loses or gains mouse capture.
Public eventMouseClickOccurs when the actions pane is clicked by the mouse.
Public eventMouseDoubleClickOccurs when the actions pane is double clicked by the mouse.
Public eventMouseDownOccurs when the mouse pointer is over the actions pane and a mouse button is pressed.
Public eventMouseEnterOccurs when the mouse pointer enters the actions pane.
Public eventMouseHoverOccurs when the mouse pointer rests on the actions pane.
Public eventMouseLeaveOccurs when the mouse pointer leaves the actions pane.
Public eventMouseMoveOccurs when the mouse pointer is moved over the actions pane.
Public eventMouseUpOccurs when the mouse pointer is over the actions pane and a mouse button is released.
Public eventMouseWheelOccurs when the mouse wheel moves while the actions pane has focus.
Public eventMoveOccurs when the actions pane is moved.
Public eventOrientationChangedOccurs when the Orientation of the actions pane changes.
Public eventPaddingChangedOccurs when the actions pane's padding changes.
Public eventPaintOccurs when the actions pane is redrawn.
Public eventParentChangedOccurs when the Parent property value changes.
Public eventPreviewKeyDownOccurs before the KeyDown event when a key is pressed while focus is on this control.
Public eventQueryAccessibilityHelpOccurs when an AccessibleObject is providing help to accessibility applications.
Public eventQueryContinueDragOccurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.
Public eventRegionChangedOccurs when the value of the Region property changes.
Public eventResizeOccurs when the actions pane is resized.
Public eventRightToLeftChangedOccurs when the RightToLeft property value changes.
Public eventScrollOccurs when the user or code scrolls through the client area.
Public eventSizeChangedOccurs when the Size property value changes.
Public eventStyleChangedOccurs when the actions pane style changes.
Public eventSystemColorsChangedOccurs when the system colors change.
Public eventTabIndexChangedOccurs when the TabIndex property value changes.
Public eventTabStopChangedOccurs when the TabStop property value changes.
Public eventTextChangedInfrastructure. This event is not supported by the actions pane.
Public eventValidatedOccurs when the actions pane is finished validating.
Public eventValidatingOccurs when the actions pane is validating.
Public eventVisibleChangedOccurs when the Visible property value changes.
Top

Every document-level customization for Excel or Word exposes an ActionsPane object. You can use this object to customize the user interface of the Document Actions task pane in a document-level project. To get the ActionsPane object, use the ActionsPane field of the ThisDocument class (for Word) or the ThisWorkbook class (for Excel) in your project. For more information, see Actions Pane Overview.

Each ActionsPane object extends an underlying Windows Forms UserControl that provides a user interface that you can customize. Most of the ActionsPane members correspond to members of the underlying UserControl. Use the following ActionsPane members to access actions pane-specific functionality:

  • Clear method. Use this method to detach the actions pane from the document or workbook.

  • AutoRecover property. Use this property to prevent or allow end users to detach the actions pane from the document or workbook.

  • Orientation property. Use this property to determine whether the actions pane is docked to the top or bottom of the document or workbook, or to the left or right of the document or workbook.

  • StackOrder property. Use this property to specify the direction that controls are stacked on the actions pane.

  • OrientationChanged event. Use this property to determine when the actions pane is docked to a different location.

NoteNote

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 and the .NET Framework 4.5. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

The following code example demonstrates how to create a simple actions pane that automatically adjusts the alignment of its contents. When the user changes the orientation of the actions pane by moving the actions pane to a different part of the application window, or the user clicks on a Button control in the actions pane, the Orientation property is used to determine the new value of the StackOrder property. To run this code, call the InitActionsPane method from the ThisWorkbook_Startup event handler of a document-level project for Excel.

private void InitActionsPane()
{
    Globals.ThisWorkbook.ActionsPane.Clear();
    Globals.ThisWorkbook.ActionsPane.Visible = true;
    Globals.ThisWorkbook.ActionsPane.AutoRecover = true;
    Globals.ThisWorkbook.ActionsPane.OrientationChanged +=
        new EventHandler(ActionsPane_OrientationChanged);
    ResetStackOrder();

    // Create the button that will update the stack order.
    Button button1 = new Button();
    button1.Text = "Change stack order";
    button1.Click += new EventHandler(button1_Click);

    // Create two more buttons that do nothing.
    Button button2 = new Button();
    button2.Text = "Button 2";
    Button button3 = new Button();
    button3.Text = "Button 3";

    Globals.ThisWorkbook.ActionsPane.Controls.AddRange(
        new Control[] { button1, button2, button3 });
}

// Switch the stack order according to the current orientation. 
void button1_Click(object sender, EventArgs e)
{
    if (Globals.ThisWorkbook.ActionsPane.Orientation == 
        Orientation.Horizontal)
    {
        if (Globals.ThisWorkbook.ActionsPane.StackOrder == 
            Microsoft.Office.Tools.StackStyle.FromLeft)
        {
            Globals.ThisWorkbook.ActionsPane.StackOrder =
                Microsoft.Office.Tools.StackStyle.FromRight;
        }
        else
        {
            Globals.ThisWorkbook.ActionsPane.StackOrder =
                Microsoft.Office.Tools.StackStyle.FromLeft;
        }
    }
    else
    {
        if (Globals.ThisWorkbook.ActionsPane.StackOrder ==
            Microsoft.Office.Tools.StackStyle.FromTop)
        {
            Globals.ThisWorkbook.ActionsPane.StackOrder =
                Microsoft.Office.Tools.StackStyle.FromBottom;
        }
        else
        {
            Globals.ThisWorkbook.ActionsPane.StackOrder =
                Microsoft.Office.Tools.StackStyle.FromTop;
        }
    }
}

void ActionsPane_OrientationChanged(object sender, EventArgs e)
{
    ResetStackOrder();
}

// Readjust the stack order so that it matches the current orientation. 
void ResetStackOrder()
{
    if (Globals.ThisWorkbook.ActionsPane.Orientation == 
        Orientation.Horizontal &&
       (Globals.ThisWorkbook.ActionsPane.StackOrder == 
           Microsoft.Office.Tools.StackStyle.FromTop ||
        Globals.ThisWorkbook.ActionsPane.StackOrder ==
           Microsoft.Office.Tools.StackStyle.FromBottom))
    {
        Globals.ThisWorkbook.ActionsPane.StackOrder =
            Microsoft.Office.Tools.StackStyle.FromLeft;
    }

    if (Globals.ThisWorkbook.ActionsPane.Orientation == 
        Orientation.Vertical &&
       (Globals.ThisWorkbook.ActionsPane.StackOrder ==
           Microsoft.Office.Tools.StackStyle.FromLeft ||
        Globals.ThisWorkbook.ActionsPane.StackOrder ==
           Microsoft.Office.Tools.StackStyle.FromRight))
    {
        Globals.ThisWorkbook.ActionsPane.StackOrder =
            Microsoft.Office.Tools.StackStyle.FromTop;
    }
}
Show:
© 2014 Microsoft