How can I get calendar selection to form (VBA)?

  • Thread starter Thread starter usabmaster
  • Start date Start date
U

usabmaster

I am trying to create an holiday planner, which relies on the
appointment technique. So far I created a button to open the
appointment form with some pre-defined parameters.
But now I have the problem to get the information of the selection in
the calendar. For example: marked from 9.30 to 15.30. Then press the
button to open the form. But how can I get the information of the
selection into the form?


Another question: how can I add "new holiday" to the right-click-menu
on the calendar. the menu bars are no problem, but the context menu
is.


Thanks for any help in advance.


Rgds, usabmaster
 
The trick is to use CommandBars to execute the New command. See http://www.outlookcode.com/codedetail.aspx?id=616 for a code sample.

In versions before Outlook 2007, Outlook does not directly expose the right-click context menu in its CommandBars collection. You will, however, see a new right-click command is when the item selected is using a custom form that includes one or more custom actions. You can also add a custom action without using a custom form, as demonstrated at http://www.outlookcode.com/codedetail.aspx?id=526

Richard Kagerer has posted a code sample at http://www.outlookcode.com/codedetail.aspx?id=314 that shows how you might trick Outlook into exposing the context menu through Explorer.CommandBars.

Outlook 2007 provides Application-level events for the most commonly used context menus.
 
Back
Top