Is it possible to access the current new item Id, (pre-creation) from a custom ribbon button action?
For example, I have created a new button within the Appointment Tab, so when someone creates a new appointment or meeting, my button is there on the right hand side of the ribbon. I have that wired up to a Click event. What I want to do here, is somehow access some sort of identifier to the currently being composed appointment/meeting, when that button is clicked.
So I'm wondering;
- does outlook create some sort of ID for the message, even before clicking 'Send' or 'Save' ? And if so is this obtainable?
Just thought I'd add, an alternative/workaround for me would be if I could somehow bind or add data to the appointment, which I could then retrieve through some sort of listener when the appointment gets created (which I would then have the ID for). I'm hoping this will definitely be possible given the other ribbon buttons perform actions on the appointment when it's created?
RibbonControl is passed as an argument to your event handler.
RibbonControl.Context will be the
Inspector object (or
Explorer if your button is on the Explorer ribbon). Use the
Inspector.CurrentItem property to retrieve the item.