For a context menu command, the mpoExtra field is not used and will always be null (or Nothing in VB). The only time the mpoExtra field will contain an IEdmEnumeratorVariable object is when OnCmd is called as a result of a data card button being pressed or a data field on a card is changed.
In all other cases, the file-specific data is contained in the array of EdmCmdData passed in as the second argument to OnCmd. For a context menu item selection, the EdmCmdData object for each file will contain 4 values, as stated in the API help for EdmCmdData:
ID of file (or zero if a folder is selected).
ID of folder (or zero if a file is selected).
ID of parent folder of the selected file or folder.
Name of file or folder. (Only the name, not a full path.)
So, you typically would loop through the EdmCmdData array, using IEdmVault::GetObject (passing in the value of mlObjectID1) to get the IEdmFile object and then calling IEdmFile::GetEnumeratorVariable. Then you can call GetVar/SetVar to view or change the data. Read the SetVar documentation closely. You have to remember to call Flush or CloseFile to make sure you don't cause sharing violations.
If you have to update multiple files, the preferred method is to use the IEdmBatchUpdate2 object.
Thank you for clearing that up for me. I was a little confused on when to use the mpoExtra and when not too.