A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 3rd 07, 11:18 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default How can I get calendar selection to form (VBA)?

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

  #2  
Old July 3rd 07, 12:21 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How can I get calendar selection to form (VBA)?

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.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


wrote in message oups.com...
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.

  #3  
Old July 4th 07, 05:56 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default How can I get calendar selection to form (VBA)?

Thank you very much, I got it

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom journal form accessed from contact activities selection...? Kenny Outlook - Using Forms 1 December 4th 06 12:51 PM
Language selection does not take ritter197 Outlook - General Queries 0 October 23rd 06 10:35 PM
Contact selection DCL Outlook - Using Contacts 5 September 15th 06 02:06 AM
Custom task form - disabling box selection/deselection AndyKnights Outlook - Using Forms 0 August 8th 06 10:17 AM
Message selection Julieta Prandi Add-ins for Outlook 0 March 30th 06 10:22 PM


All times are GMT +1. The time now is 06:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.