Commands.Raise(String, Int32, Object, Object) Commands.Raise(String, Int32, Object, Object) Commands.Raise(String, Int32, Object, Object) Commands.Raise(String, Int32, Object, Object) Commands.Raise(String, Int32, Object, Object) Method

Definition

Executes the specified command.

public:
 void Raise(System::String ^ Guid, int ID, [Runtime::InteropServices::Out] System::Object ^ % CustomIn, [Runtime::InteropServices::Out] System::Object ^ % CustomOut);
void Raise(std::wstring const & Guid, int ID, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & CustomIn, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & CustomOut);
[System.Runtime.InteropServices.DispId(4)]
public void Raise (string Guid, int ID, out object CustomIn, out object CustomOut);
abstract member Raise : string * int *  *  -> unit
Public Sub Raise (Guid As String, ID As Integer, ByRef CustomIn As Object, ByRef CustomOut As Object)
Parameters
Guid
String String String String String

Required. The command's GUID.

ID
Int32 Int32 Int32 Int32 Int32

Required. The command's ID.

CustomIn
Object Object Object Object Object

Required. Arguments in a SafeArray passed in from the OLECommandTarget.

CustomOut
Object Object Object Object Object

Required. Arguments in a SafeArray passed out to be returned by the OLECommandTarget.

Examples

' Macro code.  
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  

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

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

Applies to