Programmatically accessing the Group Schedule's detail form

  • Thread starter Thread starter boontat
  • Start date Start date
B

boontat

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
 
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.
 
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
 
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, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
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 :)
 
Cool. I thought you could only read the data, not actually open the item.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
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
 
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...
 
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).
 
Back
Top