- Joined
- Mar 27, 2006
- Messages
- 4
- Reaction score
- 0
guys can u help me.. how can i open a pst file using vb6 if i have a pst file named zee.pst or cmz.pst and it is in c:/zee.pst or c:/ my documents/cmz..
MAPI is a defualt pst right.. what if i want to change the path. coz i want to want to view the names and addresses.. thank you guys...
MAPI = outlook.pst
heres my code:
Private Sub Getnameaddress()
Dim ol As New Outlook.Application
Dim olNS As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myItems As Outlook.Items
grd.Rows = 2
Set olNS = ol.GetNamespace("MAPI")
Set myFolder = olNS.GetDefaultFolder(olFolderContacts)
Set myItems = myFolder.Items
For Each SpecificItem In myItems
grd.TextMatrix(grd.Rows - 1, 0) = SpecificItem.FullName
grd.TextMatrix(grd.Rows - 1, 1) = SpecificItem.Email1Address
grd.Rows = grd.Rows + 1
Next
End Sub
MAPI is a defualt pst right.. what if i want to change the path. coz i want to want to view the names and addresses.. thank you guys...
MAPI = outlook.pst
heres my code:
Private Sub Getnameaddress()
Dim ol As New Outlook.Application
Dim olNS As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myItems As Outlook.Items
grd.Rows = 2
Set olNS = ol.GetNamespace("MAPI")
Set myFolder = olNS.GetDefaultFolder(olFolderContacts)
Set myItems = myFolder.Items
For Each SpecificItem In myItems
grd.TextMatrix(grd.Rows - 1, 0) = SpecificItem.FullName
grd.TextMatrix(grd.Rows - 1, 1) = SpecificItem.Email1Address
grd.Rows = grd.Rows + 1
Next
End Sub