I
Irene
Hi,
I am new to VB.net but I have been programing in VBA for a year or so.
I am trying to convert some vba code to vb.net bu I am running into some
propblems.
1) when I access a public folder on Exchange ( contact) I can only bring
back 272 names and then I get a error. If it is less then 272 names then I am
fine. How can I fix this error?
2) How can I access a user defined propertise in a custom form I designed
from vb.net. I have tried a couple of things, but it did not work.
Down below is my code:
By pressing a button I want to fill a combobox with data from a outlook
folder ( public folder)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim objOutlook As Microsoft.Office.Interop.Outlook._Application
objOutlook = New Microsoft.Office.Interop.Outlook.Application()
Dim objNS As Microsoft.Office.Interop.Outlook._NameSpace = objOutlook.Session
Dim oAllPublicFolders As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim oPublicFolders As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim objContacts As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim up As Microsoft.Office.Interop.Outlook.UserProperties
oPublicFolders = objNS.Folders("Public Folders")
oAllPublicFolders = oPublicFolders.Folders("All Public Folders")
objContacts = oAllPublicFolders.Folders("TT")
Dim objItems As Microsoft.Office.Interop.Outlook.Items = objContacts.Items
Dim iCount As Int16 = objItems.Count
MsgBox(iCount)
Dim i As Int16
For i = 1 To iCount
'box.Items.Add(objItems.Item(i).Fullname)
Console.WriteLine(objItems.Userpropertise.item("test"))
Next
I am new to VB.net but I have been programing in VBA for a year or so.
I am trying to convert some vba code to vb.net bu I am running into some
propblems.
1) when I access a public folder on Exchange ( contact) I can only bring
back 272 names and then I get a error. If it is less then 272 names then I am
fine. How can I fix this error?
2) How can I access a user defined propertise in a custom form I designed
from vb.net. I have tried a couple of things, but it did not work.
Down below is my code:
By pressing a button I want to fill a combobox with data from a outlook
folder ( public folder)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim objOutlook As Microsoft.Office.Interop.Outlook._Application
objOutlook = New Microsoft.Office.Interop.Outlook.Application()
Dim objNS As Microsoft.Office.Interop.Outlook._NameSpace = objOutlook.Session
Dim oAllPublicFolders As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim oPublicFolders As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim objContacts As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim up As Microsoft.Office.Interop.Outlook.UserProperties
oPublicFolders = objNS.Folders("Public Folders")
oAllPublicFolders = oPublicFolders.Folders("All Public Folders")
objContacts = oAllPublicFolders.Folders("TT")
Dim objItems As Microsoft.Office.Interop.Outlook.Items = objContacts.Items
Dim iCount As Int16 = objItems.Count
MsgBox(iCount)
Dim i As Int16
For i = 1 To iCount
'box.Items.Add(objItems.Item(i).Fullname)
Console.WriteLine(objItems.Userpropertise.item("test"))
Next