Does anyone know how to read items out of a listview? I have tried to loop through but I am getting an error. Here is the code that I have been using:

VB Code:
  1. Dim Item as ListViewItem
  2.  
  3. For Each Item in ListView1.Items
  4.      MsgBox (Item.Text)
  5.      MsgBox (Item.SubItems.Item(Item.Index).Text)
  6. Next

I am trying to export the contents of a listview to a text file. Does anyone have any ideas on how to get this to work?