Outlook custom forms don't support column headers on list boxes. I've never seen an explanation of why.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"graemevn" wrote in message oups.com...
I have the following code listed in this subroutine done in VBScript
(NOT VBA or VB)
Function Item_Open()
Dim mobjOptButControls
Dim objInsp
Dim ol
Dim olns
Dim cf
Dim RISTaskLists
Dim c,itmAppt
Dim ListView1
Set objInsp = Item.GetInspector
objInsp.SetCurrentFormPage "Releases"
Set olns = Item.Application.GetNameSpace("MAPI")
Set objFolder = GetFolder("Mailbox - CRIS Change Control\Calendar")
Set objItems = objFolder.Items
Set ListView1=
objInsp.ModifiedFormPages("Releases").Controls("Li stView1")
'Add headers - this isn't being done!!! WHY????????????????
'----------------------------------------------------------------------------------------------------------
ListView1.ColumnHeaders.Add , , "Release Topic", ListView1.Width /
1.95
ListView1.ColumnHeaders.Add , , "Start Date", ListView1.Width / 6.85
ListView1.ColumnHeaders.Add , , "Identifier", ListView1.Width / 6.05
ListView1.ColumnHeaders.Add , , "Priority", ListView1.Width / 6.5
ListView1.ColumnHeaders.Add , , "Release Type", ListView1.Width /
6.5
Set objItems = objFolder.Items
iNumOfItems = objItems
Msgbox(iNumOfItems)
For i = 1 To iNumOfItems
Set c = objItems(i)
'If c.Type Is AppointmentItem Then
itmAppt = oItem
'IPM.Task.CRIS_ALL_TASKS.ListBox1.AddItem c.Subject
'RISTaskLists.AddItem c.Subject
'End If
Next
End Function
The problem is that the headers of the ListView1 control is not being
created! No matter what I do!
As if these lines are ignored or whatever (which sound sily because
through the use of mshboxes, I know the code runs to the end of the
sub.
So what is going o? Why no headers?