Commands.Raise(String, Int32, Object, Object) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Führt den angegebenen Befehl aus.
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);
[<System.Runtime.InteropServices.DispId(4)>]
abstract member Raise : string * int * obj * obj -> unit
Public Sub Raise (Guid As String, ID As Integer, ByRef CustomIn As Object, ByRef CustomOut As Object)
Parameter
- Guid
- String
Erforderlich. Die Befehls-GUID.
- ID
- Int32
Erforderlich. Die Befehls-ID.
- CustomIn
- Object
Erforderlich. Argumente in einem vom OLECommandTarget übergebenen SafeArray.
- CustomOut
- Object
Erforderlich. Argumente in einem SafeArray, das vom OLECommandTarget zurückgegeben wird.
- Attribute
Beispiele
' 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