Consulting

Results 1 to 3 of 3

Thread: Solved: listview logic

  1. #1
    VBAX Regular
    Joined
    Sep 2005
    Posts
    78
    Location

    Solved: listview logic

    I am taking mails from inbox(to, subject, sentdate) in a listview.
    I am giving u the code snippet i am using.

     If (oinFolder Is Nothing) Or (oinFolder.Items.Count < 1) Then
    		initems = False
    	Else
      
    			j = 1
    			For Each Inboxmail In oinFolder.Items
    		   
    				If Inboxmail.Class = olMail Then
    			   
    				With ListView1.ListItems
    					.Add j, , Inboxmail.To
    				End With
    	   
    				With ListView1
    					.ListItems(j).SubItems(1) = Inboxmail.subject
    					'.ListItems(j).ListSubItems(1).Tag = Inboxmail.body
    				End With
    	   
    				With ListView1
    					.ListItems(j).SubItems(2) = Inboxmail.SentOn
    				End With
    			'End If
    			
    				ElseIf Inboxmail.Class = olReport Then
    					j = j - 1
    				End If
    			j = j + 1
    		   Next

    I am getting 1st and last item in a listview properly.
    But i am not getting column 2 and 3 values for rest., i.e. Its displays nothing.

    What should i change in the above code?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Can you show all your code to save having to work it out?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Sep 2005
    Posts
    78
    Location
    Sorry i forgot to mark thread solved.

    I have changed certain properties of the list view and it worked fine..

    Yhank You.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •