Retrieving Message data and sending it to a text b - WeOnlyDo Discussion board

Retrieving Message data and sending it to a text b (wodPop3)

by nightwalker83, Friday, August 27, 2010, 11:56 (5203 days ago)

Hi,

I use a ListView control in Visual Basic 6 to display the subject, from information of recieved messages. How would I populate text boxes with the data associated with the item I have selected in the listview say item1 so the three textboxes would display item1.from, item1.subject and item1.body?

This is how I did it when I only had one message to deal with when I was using the MAPI Controls.

Private Sub Form_Load()
'Get information from the message so it can be read.
txtFrom.Text = frmMain.MAPIMessages1.MsgOrigAddress
txtSubject.Text = frmMain.MAPIMessages1.MsgSubject
txtBody.Text = frmMain.MAPIMessages1.MsgNoteText
End Sub

Thanks,

Nightwalker

Re: Retrieving Message data and sending it to a te

by wodDamir, Friday, August 27, 2010, 12:25 (5203 days ago) @ nightwalker83

Nightwalker,

I'm not really sure if this question is even related to the component?

However, if the problem is exctracting subject/from/to info from the message, then you can try iterating thru all the messages, and populate the textBoxes.

Regards,
Damba

Re: Retrieving Message data and sending it to a te

by nightwalker83, Saturday, August 28, 2010, 04:21 (5202 days ago) @ wodDamir

Nightwalker,

I'm not really sure if this question is even related to the component?

However, if the problem is exctracting subject/from/to info from the message, then you can try iterating thru all the messages, and populate the textBoxes.

Regards,
Damba

I think what I need to do is retrive the index of the current message retrieved by the component.

Edit:

pop3.Messages.Item(iMsgID) Worked!