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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

What's wrong here???



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 30th 06, 01:44 AM posted to microsoft.public.outlook.program_forms
graemevn
external usenet poster
 
Posts: 1
Default What's wrong here???

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?

Ads
  #2  
Old October 30th 06, 01:44 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default What's wrong here???

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?

 




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
OE won't authenticate, what am I doing wrong? BEVERLEE CLARK Outlook Express 3 October 9th 06 02:56 AM
wrong message Giampaolo Lombardo Outlook Express 2 October 4th 06 01:35 PM
Wrong from address John Outlook - Installation 8 July 6th 06 01:57 PM
Wrong Address? Marty Outlook Express 13 February 8th 06 04:19 AM


All times are GMT +1. The time now is 03:50 PM.


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