Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to use outlook redemption

Posted on 2014-09-16
1
383 Views
Last Modified: 2014-09-23
Could someone show me how to use outlook redemption to accomplish the same thing as the code example?
    Private Sub bw_DoWork(sender As Object, e As DoWorkEventArgs) Handles bw.DoWork

        Dim outlookApp As Outlook.Application = New Outlook.Application
        'Dim oNS As Outlook.NameSpace = outlookApp.Session
        Dim oNS As Outlook.NameSpace = outlookApp.GetNamespace("mapi")
        Dim oContacts As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
        Dim oItems As Outlook.Items = oContacts.Items
        Dim oContact As Outlook.ContactItem = Nothing

        Dim dt As New DataTable
        dt.TableName = "Companies"
        dt.Columns.Add("Company")

        For Each contactItem As Outlook.ContactItem In oContacts.Items
            'ProgressBar1.Maximum = oContacts.Items.Count
            If Not contactItem.CompanyName = Nothing Then
                dt.Rows.Add(contactItem.CompanyName)
            End If
        Next

        outlookApp.Quit()
        outlookApp = Nothing

    End Sub

Open in new window

0
Comment
Question by:Basicfarmer
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 40338742
Example on following page shows the use of Redemption with VB

http://www.outlookcode.com/threads.aspx?forumid=5&messageid=18312
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question