Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / October 2006

Tip: Looking for answers? Try searching our database.

What's wrong here???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
graemevn - 30 Oct 2006 02:44 GMT
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("ListView1")

  '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?
Sue Mosher [MVP-Outlook] - 30 Oct 2006 14:44 GMT
Outlook custom forms don't support column headers on list boxes. I've never seen an explanation of why.

Signature

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
 

>I have the following code listed in this subroutine done in VBScript
> (NOT VBA or VB)
[quoted text clipped - 58 lines]
>
> So what is going o? Why no headers?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.