Export (0) Print
Expand All
Cut
Run
Expand Minimize

Raise Method

Visual Studio .NET 2003

Executes the specified command.

[Visual Basic .NET]
Public Sub Raise( _
   ByVal Guid As String, _
   ByVal ID As Integer, _
   ByRef CustomIn As Object, _
   ByRef CustomOut As Object _
) 
[Visual Basic 6]
Sub Raise( _
   ByVal Guid As String, _
   ByVal ID As Long, _
   ByRef CustomIn As Variant, _
   ByRef CustomOut As Variant _
) 
[C++]
HRESULT __stdcall Raise(
   BSTR Guid,
   long ID,
   VARIANT* CustomIn,
   VARIANT* CustomOut
);
[C#]
public void Raise(
   string Guid,
   int ID,
   ref object CustomIn,
   ref object CustomOut
);
[JScript .NET]
public function Raise(
   Guid : String,
   ID : int,
   CustomIn : Object,
   CustomOut : Object
)

Parameters

GUID
Required. The command's GUID.
ID
Required. The command's ID.
CustomIn
Required. Arguments in a SafeArray passed in from the OLECommandTarget.
CustomOut
Required. Arguments in a SafeArray passed out to be returned by the OLECommandTarget.

Example

Sub RaiseExample()
   ' Before running, you must add a reference to the Office 
   ' typelib to gain access to the CommandBar object.
   Dim cmds As Commands
   Dim cmdobj As Command
   Dim customin, customout As Object
   Dim colAddins As AddIns

   ' Set references.
   colAddins = DTE.AddIns()
   cmds = DTE.Commands
   cmdobj = cmds.Item("File.NewFile")

   ' Execute the File.NewFile command.
   cmds.Raise(cmdobj.Guid, cmdobj.ID, customin, customout)
End Sub

See Also

Applies To: Commands Collection

Show:
© 2015 Microsoft