How can I read the body text using VB6

G

Guest

Hi
I am trying to read the body text of incoming mail using VB6. I can step through folders using oulook.mapifolder. So far I have been able to get the text from the body but it sticks all characters together.
As all the individual information comes in seperate line, I would like to view them in the same format. I know there is a way of reading text using Mapi or CDO but I don't know how

Is anyone can help me
I also attached my code for your information

regard
Ka

===========================================================
Dim Mapifolder As outlook.Mapifolde
Dim ColFolders As outlook.Folder
Dim Folders As outlook.Mapifolde
Dim ColMapiFolders2 As outlook.Folder
Dim Mapifolder2 As outlook.Mapifolde
Dim ColMapiFolders3 As outlook.Folder
Dim MapiFolder3 As outlook.Mapifolde
Dim ColMapiFolders4 As outlook.Folder
Dim MapiFolder4 As outlook.Mapifolde
Dim ColMapiFolders5 As outlook.Folder
Dim MapiFolder5 As outlook.Mapifolde
Dim ColMapiFolders6 As outlook.Folder
Dim MapiFolder6 As outlook.Mapifolde

Dim Treenode As Nod

Set olApp = New outlook.Applicatio
Set olNS = olApp.GetNamespace("Mapi"
Set MySession = CreateObject("MAPI.Session"
Set Mapifolder = olNS.Folders("Public Folders"
Set Mapifolder2 = Mapifolder.Folders("All Public Folders"
Set MapiFolder3 = Mapifolder2.Folders("TGI Questionnaire Suggestions"
Set MapiFolder4 = MapiFolder3.Folders("Accepted"
Set MapiFolder5 = MapiFolder3.Folders("Rejected"

If MapiFolder4.Name = "Accepted" The
With tvMail.Node
Set Treenode = .Add(, , "root", MapiFolder4.Name, 1

End Wit

Set ColMapiFolders5 = MapiFolder4.Folder
For Each MapiFolder5 In ColMapiFolders
With tvMail.Node
Set Treenode = .Add("root", tvwChild, , MapiFolder5.Name, 1
End Wit

Dim MyItem As outlook.MailIte

For Each MyItem In MapiFolder5.Item

ListView5.ListItems.Add 1, , MyItem.bod
Nex
Nex
End I

Set ColMapiFolders4 = Nothin
Set ColMapiFolders3 = Nothin
Set ColMapiFolders2 = Nothin
Set ColMapiFolder = Nothing
 
E

Eric Legault [MVP - Outlook]

The formatting should be retained within the Body property. Try outputting
the property value to the debug value and see how it displays.

--
Eric Legault, B.A., MCP, MCSD, MVP - Outlook
ImagiNET Resources Corp.
http://www.imaginets.com


Kam said:
Hi,
I am trying to read the body text of incoming mail using VB6. I can step
through folders using oulook.mapifolder. So far I have been able to get the
text from the body but it sticks all characters together.
As all the individual information comes in seperate line, I would like to
view them in the same format. I know there is a way of reading text using
Mapi or CDO but I don't know how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top