Home All Groups Group Topic Archive Search About

windows mobile pocketoutlook

Author
26 May 2009 6:54 PM
Michael Courter
anybody know how to add contacts to pocketmobile using vb.net?
tia,
mcnewsxp

Author
26 May 2009 8:41 PM
Brad
On May 26, 2:54 pm, "Michael Courter" <mcour***@mindspring.com> wrote:
> anybody know how to add contacts to pocketmobile using vb.net?
> tia,
> mcnewsxp

What version of Visual Studio are you using?

IMHO inthehand's pocketoutlook wrapper is the easiest way to get this
functionality.
Author
26 May 2009 9:33 PM
Michael Courter
> anybody know how to add contacts to pocketmobile using vb.net?
> tia,
> mcnewsxp

What version of Visual Studio are you using?

IMHO inthehand's pocketoutlook wrapper is the easiest way to get this
functionality.

i'm using 2005.  i'd rather not add any 3rd party stuff if i can avaoid it.
Author
26 May 2009 9:43 PM
Michael Courter
Private Sub AddContact(ByVal PhoneNumber As String)

Dim found As Boolean

Dim ol As OutlookSession = New OutlookSession()

Dim newContact As Contact

Dim iter As ContactCollection.ContactCollectionEnumerator =
ol.Contacts.Items.GetEnumerator()

Do While iter.MoveNext()

If (iter.Current.MobileTelephoneNumber.Equals(PhoneNumber)) Then

found = True

End If

Loop

If Not (found) Then

newContact = ol.Contacts.Items.AddNew()

'iter.Current.MobileTelephoneNumber = PhoneNumber

newContact.FirstName = "Joe"

newContact.MobileTelephoneNumber = PhoneNumber

newContact.Update()

End If

End Sub