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