Hoofdcategorieën

Bekijk bericht in topic: [Outlook / contacts] een email versturen naar het IM-adres

Front Verplichte Underscores

quote:
Is er een mogelijkheid om dit te automatiseren? Ik heb geen zin om dit bij elke account handmatig te moeten gaan doen.

Visual Basic:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sub SetAffiliationForContacts()
    Dim ns As NameSpace
    Dim foldContact As Folder
    Dim itemContact As ContactItem
    Dim colItems As Outlook.Items
    Dim myProperty As Outlook.UserProperty
       
    Set ns = Application.GetNamespace("MAPI")
    Set foldContact = ns.GetDefaultFolder(olFolderContacts)
    Set colItems = foldContact.Items.Restrict("[MessageClass]='IPM.Contact'")
    
    For Each itemContact In colItems
        ' Add user property to contact items
        Set myProperty = itemContact.UserProperties.Add("Affiliation"olText)
        If itemContact.HomeTelephoneNumber = "" Then
            myProperty = "Business"
        Else
            myProperty = "Personal"
        End If
        itemContact.Save
    Next
End Sub

Dit is het voorbeeld uit de help, dat wil je even aanpassen zodanig dat itemContact.Email3Address wordt gevuld met de inhoud van .IMAddress en .IMAddress wordt geleegd. (Maar natuurlijk alleen als Email3 niet al vol is).

'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind'


Bekijk bericht
Bericht:
Quote bericht:

VNU Media logo Powered by True

© 1998 - 2008 Tweakers.net - Alle rechten voorbehouden

Uitgever van: