Just looking for a bit of help regarding creating a custom command in worksite with v8.2 of the SDK.I've created an assembly and hooked it all up in the registry so that when you right-click on a workspace in the left hand pane in Outlook the menu pops up with my new custom option on there. That bit is fine, the bit that isn't fine is that when I try to access the context item values listed in page 15, table 2.2 of the Creating Custom Commands in WorkSite guide, most of them are unavailble to me, even the ones marked "When present... Always", such as SelectedContainer. The only ones that work are NRTDMS, ParentWindow and SelectedNRTSessions.In essence all I want to be able to do is to right click on a workspace in the left hand pane and get all of the details about that workspace , name, id, etc.Can you please advise.
Private Sub ICommand_Execute() 'MsgBox "Custom command executed!" Dim ws As IManWorkspace On Error Resume Next Set ws = mContext.Item("SelectedFolderObject") Set ws = Nothing Set ws = mContext.Item("SelectedIManObject") Set ws = Nothing Set ws = mContext.Item("SelectedContentsContainer") Set ws = Nothing Set ws = mContext.Item("DestinationObject") Set ws = Nothing Set ws = mContext.Item("IManDestinationObject") Exit SubExecuteError: ' Error handling code could go here. The error handling code should not ' explicitly raise any errors. ' END EXAMPLE OF A POSSIBLE EXECUTE IMPLEMENTATIONEnd Sub
IManWorkspace ws = (IManWorkspace)mContext.Item("SelectedFolderObject");