MS Office Forum / Outlook / Calendaring / December 2004
Programmatically accessing the Group Schedule's detail form
|
|
Thread rating:  |
boontat - 30 Nov 2004 02:51 GMT Hi,
I am a newbie to outlook. I need help with the project assigned to me.
Currently, to access the Group Schedules in ol2003, i need to navigate through the commandbar to find the control 7001 and execute it. However this only open up the form that shows the groups in it and I have to select the group i want to display the details. I need to bypass this by programmatically selecting the group inside the form and open up the detail schedule of the group. Can it be done?
Regards, BoonTat
Sue Mosher [MVP-Outlook] - 30 Nov 2004 03:20 GMT No, it can't be done. Group schedules are hidden, special appointment items. No schedule details are actually stored in them. They're generated on demand when the user views the item.
 Signature Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx
> Hi, > [quoted text clipped - 11 lines] > Regards, > BoonTat boontat - 30 Nov 2004 07:13 GMT Hi Sue,
Thanks, I am able to extract the hidden items using the CDO object. Is there any method to pass the hidden item id i got and let the detail form generate the group schedules on demand?
Regards, Boon Tat
> No, it can't be done. Group schedules are hidden, special appointment items. > No schedule details are actually stored in them. They're generated on demand [quoted text clipped - 15 lines] > > Regards, > > BoonTat Sue Mosher [MVP-Outlook] - 30 Nov 2004 12:11 GMT You'd have to display it, but CDO doesn't have any display method. You could try passing the entryID to Outlook, but I'd be surprised if Namespace.GetItemFromID would open a hidden item..
 Signature Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx
> Hi Sue, > [quoted text clipped - 24 lines] >> > detail >> > schedule of the group. Can it be done? Ken Slovak - [MVP - Outlook] - 30 Nov 2004 14:35 GMT You can get an item from the HiddenMessages collection and get the EntryID and Outlook will open it with no problems. I do that all the time. It's getting to HiddenMessages that's the problem with OOM code :)
 Signature Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
> You'd have to display it, but CDO doesn't have any display method. You could > try passing the entryID to Outlook, but I'd be surprised if > Namespace.GetItemFromID would open a hidden item.. Sue Mosher [MVP-Outlook] - 30 Nov 2004 23:54 GMT Cool. I thought you could only read the data, not actually open the item.
 Signature Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx
> You can get an item from the HiddenMessages collection and get the EntryID > and Outlook will open it with no problems. I do that all the time. It's [quoted text clipped - 4 lines] >> try passing the entryID to Outlook, but I'd be surprised if >> Namespace.GetItemFromID would open a hidden item.. Ken Slovak - [MVP - Outlook] - 01 Dec 2004 14:42 GMT Not only that, but if you can manage to get a handle to one of the hidden folders like Reminders you can even work with that in the OOM as long as you have the folder EntryID and StoreID. The trick is getting that handle...
 Signature Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
> Cool. I thought you could only read the data, not actually open the item. boontat - 01 Dec 2004 03:51 GMT Hi Ken,
Could you enlighten me on how you get the item from the HiddenMessages collection and get the Outlook to open it? An example would be great.
Thanks, Boon Tat
> You can get an item from the HiddenMessages collection and get the EntryID > and Outlook will open it with no problems. I do that all the time. It's [quoted text clipped - 4 lines] > > try passing the entryID to Outlook, but I'd be surprised if > > Namespace.GetItemFromID would open a hidden item.. Ken Slovak - [MVP - Outlook] - 01 Dec 2004 14:49 GMT Well, first of all you can't get there from here with the Outlook object model. You need to use CDO 1.21 (optional installation for Outlook 2000 and later) or Extended MAPI (C++ or Delphi only) or Redemption (www.dimastr.com/redemption) to get at the HiddenMessages collection of a folder.
Here's a CDO 1.21 example of getting a hidden item from the Inbox:
'oOL is the Outlook.Application object, already instantiated somewhere Dim oNS As Outlook.NameSpace Dim oCDO As MAPI.Session Dim oFolder As MAPI.Folder Dim colMessages As MAPI.Messages Dim strID As String Dim oItem As Outlook.MailItem
Set oNS = oOL.Session
Set oCDO = CreateObject("MAPI.Session") oCDO.Logon "", "", False, False Set oFolder = oCDO.Inbox Set colMessages = oFolder.HiddenMessages strID = colMessages.Item(1).ID
Set oItem = oNS.GetItemFromID(strID) oItem.Display
Of course the hidden messages collection must exist, the first item must be a mail item and it must not be something like a custom message class that has views or something like that for this code to work. You'd also need CDO installed and have a reference set to it (CDO.DLL).
 Signature Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
> Hi Ken, > [quoted text clipped - 4 lines] > Thanks, > Boon Tat boontat - 02 Dec 2004 03:49 GMT Hi Ken,
Thanks :) You've been a great help.
Regards, BoonTat
> Well, first of all you can't get there from here with the Outlook object > model. You need to use CDO 1.21 (optional installation for Outlook 2000 and [quoted text clipped - 36 lines] > > Thanks, > > Boon Tat
|
|
|