CommandBarControl.Copy Method

Copies a command bar control to an existing command bar.

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
Function Copy ( _
    Bar As Object, _
    Before As Object _
) As CommandBarControl
'Usage
Dim instance As CommandBarControl
Dim Bar As Object
Dim Before As Object
Dim returnValue As CommandBarControl

returnValue = instance.Copy(Bar, Before)
CommandBarControl Copy(
    Object Bar,
    Object Before
)

Parameters

  • Bar
    Type: System.Object

    Optional Object. A CommandBar object that represents the destination command bar. If this argument is omitted, the control is copied to the command bar where the control already exists.

  • Before
    Type: System.Object

    Optional Object. A number that indicates the position for the new control on the command bar. The new control will be inserted before the control at this position. If this argument is omitted, the control is copied to the end of the command bar.

Return Value

Type: Microsoft.Office.Core.CommandBarControl

See Also

Reference

CommandBarControl Interface

CommandBarControl Members

Microsoft.Office.Core Namespace