![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
A week ago I started a thread how to open a group calendar. The only possibility seems to be the ugly SendKeys. But that'll only work if the appropriate (calendar) menu bar is available. Can I check this availability? Something like: Do until Application.MenuBars("CalendarMenuBar") = True x = x + 1 Loop Thanks again Frank ***** Old Thread *********** I thought doing a little Loop until the menubar is available but I don't know how to check this. Something like: Do until Application.MenuBars("CalendarMenuBar") = True x = x + 1 Loop Thanks for any futher help. Frank "Sue Mosher [MVP-Outlook] " Michael, I think Frank is talking not about a calendar folder but about a group calendar item. Those aren't accessible programmatically, except to set properties with CDO or Redemption. "Michael Bauer [MVP - Outlook]" Frank, SendKeys is never a stable solution. In your case, what should that be good for? If you want to make that group calendar the current one then you could do that directly: Dim Folder as Outlook.MapiFolder Set Folder = .... Set Application.ActiveExplorer.CurrentFolder = Folder Hi, I made a macro (O 2003), wich changes to a public calendar folder and opens a group calendar connected to this calendar via SendKeys. On my machine that's working fine even if I am in an email or contacts folder. On my clients machines the macro overhauls itself and the menubar for the calendar is not yet available when I trigger SendKeys. ************** CODE **************** Function OpenGroupCalendar(strGTP As String) Dim ALL_VAR As OBJECT_XY Set myOlApp = CreateObject("Outlook.Application") Set myNameSpace = myOlApp.GetNamespace("MAPI") Set myFolder = myNameSpace.Folders("Public Folder").Folders("All Public Folders").Folders("CompanyXY").Folders("CalendarAc counting") Set myExplorer = myOlApp.ActiveExplorer Set myExplorer.CurrentFolder = myFolder Set cbb = ActiveExplorer.CommandBars.FindControl(, 7002) SendKeys "%?? If Not cbb Is Nothing Then cbb.Execute Set ALL_VAR = Nothing End Function ************ END OF CODE ************** Thank you Frank |
Ads |
#2
|
|||
|
|||
![]()
Am Mon, 28 Aug 2006 17:20:31 +0200 schrieb Frank Bouillon:
The CommandBars object fires an OnUpdate event, maybe that helps. Whether an object is available or not could be checked by e.g.: If Not Application.ActiveExplorer.CommandBars("name") Is Nothing Then ... -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hi, A week ago I started a thread how to open a group calendar. The only possibility seems to be the ugly SendKeys. But that'll only work if the appropriate (calendar) menu bar is available. Can I check this availability? Something like: Do until Application.MenuBars("CalendarMenuBar") = True x = x + 1 Loop Thanks again Frank ***** Old Thread *********** I thought doing a little Loop until the menubar is available but I don't know how to check this. Something like: Do until Application.MenuBars("CalendarMenuBar") = True x = x + 1 Loop Thanks for any futher help. Frank "Sue Mosher [MVP-Outlook] " Michael, I think Frank is talking not about a calendar folder but about a group calendar item. Those aren't accessible programmatically, except to set properties with CDO or Redemption. "Michael Bauer [MVP - Outlook]" Frank, SendKeys is never a stable solution. In your case, what should that be good for? If you want to make that group calendar the current one then you could do that directly: Dim Folder as Outlook.MapiFolder Set Folder = .... Set Application.ActiveExplorer.CurrentFolder = Folder Hi, I made a macro (O 2003), wich changes to a public calendar folder and opens a group calendar connected to this calendar via SendKeys. On my machine that's working fine even if I am in an email or contacts folder. On my clients machines the macro overhauls itself and the menubar for the calendar is not yet available when I trigger SendKeys. ************** CODE **************** Function OpenGroupCalendar(strGTP As String) Dim ALL_VAR As OBJECT_XY Set myOlApp = CreateObject("Outlook.Application") Set myNameSpace = myOlApp.GetNamespace("MAPI") Set myFolder = myNameSpace.Folders("Public Folder").Folders("All Public Folders").Folders("CompanyXY").Folders("CalendarAc counting") Set myExplorer = myOlApp.ActiveExplorer Set myExplorer.CurrentFolder = myFolder Set cbb = ActiveExplorer.CommandBars.FindControl(, 7002) SendKeys "%?? If Not cbb Is Nothing Then cbb.Execute Set ALL_VAR = Nothing End Function ************ END OF CODE ************** Thank you Frank |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Menu bar outllok 2003 | Mago Oronzo | Outlook - General Queries | 2 | July 19th 06 10:10 PM |
lost menu bar | hazel eyes | Outlook Express | 0 | June 3rd 06 03:28 AM |
missing menu bar | hazel eyes | Outlook Express | 1 | June 3rd 06 12:46 AM |
Unable to check availability when scheduling appointments | Vegas | Outlook - Calandaring | 0 | May 18th 06 03:11 AM |
Sliding Menu Bar | Jimmy Oshiro | Outlook - Using Forms | 2 | May 3rd 06 08:13 PM |