Commands2::Raise Method (String^, Int32, Object^, Object^)
Visual Studio 2015
Executes the specified command.
Assembly: EnvDTE80 (in EnvDTE80.dll)
Parameters
- Guid
-
Type:
System::String^
Required. The command's GUID.
- ID
-
Type:
System::Int32
Required. The command's ID.
- CustomIn
-
Type:
System::Object^
Required. The in parameters for OLECommandTarget.
- CustomOut
-
Type:
System::Object^
Required. The out parameters for OLECommandTarget.
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
Show: