Running the oleview utility
A second alternative for determining the DISPID for a method or parameter is to use the oleview.exe utility. This utility is available from Microsoft as a free download. It is also included with Visual Studio.
To determine DISPID for a method: