Results 1 to 2 of 2

Thread: [RESOLVED] small logical problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    151

    Resolved [RESOLVED] small logical problem

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

    Code:
     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

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    151

    Re: small logical problem

    I have changed certain properties of listview and the problem is solved.......

Posting Permissions

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



Click Here to Expand Forum to Full Width