IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

WinDev Discussion :

Synchro contact outlook et fichier HF


Sujet :

WinDev

  1. #1
    Membre habitué
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Novembre 2007
    Messages
    297
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien maintenance

    Informations forums :
    Inscription : Novembre 2007
    Messages : 297
    Points : 129
    Points
    129
    Par défaut Synchro contact outlook et fichier HF
    Bonjour

    Je cherche à synchroniser les contacts outlook 2013 dans mon appli windev.

    J'utilise le code ci-dessous pour copier tous les contacts dans un fichier HFSQL :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
     
    // ---------------------------------------
    // Copie les contacts outlook dans le fichier HF
    // ----------------------------------------
     
     
    objApp est un objet OLE dynamique
    objNS est un objet OLE dynamique
    myFolder1 est un objet OLE dynamique
    Ocontact est un objet OLE dynamique
     
    NomBAL est une chaîne
    NomBAL = "xxxxxx@xxxxx.com"
     
    NomDossierdecontact est une chaîne
    NomDossierdecontact = "TEST_WINDEV"
     
    NBContact est un entier
    i est un entier=1
     
    objApp=ObjetActif("OutLook.Application")
    objNS=objApp>>GetNamespace("MAPI")
     
    //Récuperer le dossier contact de votre choix
    //myFolder1=objNS>>PickFolder
    myFolder1=objNS>>folders(NomBAL)>>folders(NomDossierdecontact)
     
    // Nombre de contact dans le dossier selectionné
    NBContact = myFolder1>>items>>count
    //Trace(NBContact)
     
    // Fenetre de progression du traitement
    nIndice est un entier
    OuvreFille(FenetreJauge)
    POUR nIndice = 1 A 100
    	FenetreJauge.Progression(nIndice,NBContact) 
     
    FIN
    Ferme(FenetreJauge)
     
    TANTQUE i<=NBContact
    	Ocontact=myFolder1>>items(i)	
    	//Assistant
    	Tb_contacts.AssistantName = Ocontact>>AssistantName
    	Tb_contacts.AssistantTelephoneNumber = Ocontact>>AssistantTelephoneNumber
     
    	//adresse societé
    	Tb_contacts.BusinessAddress = Ocontact>>BusinessAddress
    	Tb_contacts.BusinessAddressCity = Ocontact>>BusinessAddressCity
    	Tb_contacts.BusinessAddressCountry = Ocontact>>BusinessAddressCountry
    	Tb_contacts.BusinessAddressPostalCode = Ocontact>>BusinessAddressPostalCode
    	Tb_contacts.BusinessAddressPostOfficeBox = Ocontact>>BusinessAddressPostOfficeBox
    	Tb_contacts.BusinessAddressState = Ocontact>>BusinessAddressState
    	Tb_contacts.BusinessAddressStreet = Ocontact>>BusinessAddressStreet
     
    	//société
    	Tb_contacts.CompanyMainTelephoneNumber = Ocontact>>CompanyMainTelephoneNumber
    	Tb_contacts.CompanyName = Ocontact>>CompanyName
    	Tb_contacts.Companies = Ocontact>>Companies
     
    	// adresse emails
    	Tb_contacts.Email1Address = Ocontact>>Email1Address
    	Tb_contacts.Email1AddressType = Ocontact>>Email1AddressType
    	Tb_contacts.Email1DisplayName = Ocontact>>Email1DisplayName
     
    	Tb_contacts.Email2Address = Ocontact>>Email2Address
    	Tb_contacts.Email2AddressType = Ocontact>>Email2AddressType
    	Tb_contacts.Email2DisplayName = Ocontact>>Email2DisplayName
     
    	Tb_contacts.Email3Address = Ocontact>>Email3Address
    	Tb_contacts.Email3AddressType = Ocontact>>Email3AddressType
    	Tb_contacts.Email3DisplayName = Ocontact>>Email3DisplayName
     
    	//domicile
    	Tb_contacts.HomeAddress = Ocontact>>HomeAddress
    	Tb_contacts.Home2TelephoneNumber = Ocontact>>Home2TelephoneNumber
    	Tb_contacts.HomeAddressCity = Ocontact>>HomeAddressCity
    	Tb_contacts.HomeAddressCountry = Ocontact>>HomeAddressCountry
    	Tb_contacts.HomeAddressPostalCode = Ocontact>>HomeAddressPostalCode
    	Tb_contacts.HomeAddressPostOfficeBox = Ocontact>>HomeAddressPostOfficeBox
    	Tb_contacts.HomeAddressState = Ocontact>>HomeAddressState
    	Tb_contacts.HomeAddressStreet = Ocontact>>HomeAddressStreet
    	Tb_contacts.HomeFaxNumber = Ocontact>>HomeFaxNumber
    	Tb_contacts.HomeTelephoneNumber = Ocontact>>HomeTelephoneNumber
     
    	//Mailing	
    	Tb_contacts.MailingAddress = Ocontact>>MailingAddress
    	Tb_contacts.MailingAddressCity = Ocontact>>MailingAddressCity
    	Tb_contacts.MailingAddressCountry = Ocontact>>MailingAddressCountry
    	Tb_contacts.MailingAddressPostalCode = Ocontact>>MailingAddressPostalCode
    	Tb_contacts.MailingAddressPostOfficeBox = Ocontact>>MailingAddressPostOfficeBox
    	Tb_contacts.MailingAddressState = Ocontact>>MailingAddressState
    	Tb_contacts.MailingAddressStreet = Ocontact>>MailingAddressStreet
     
    	//Netmeeting
    	Tb_contacts.NetMeetingAlias = Ocontact>>NetMeetingAlias
    	Tb_contacts.NetMeetingServer = Ocontact>>NetMeetingServer
     
    	//Others
    	Tb_contacts.OtherAddress = Ocontact>>OtherAddress
    	Tb_contacts.OtherAddressCity = Ocontact>>OtherAddressCity
    	Tb_contacts.OtherAddressCountry = Ocontact>>OtherAddressCountry
    	Tb_contacts.OtherAddressPostalCode = Ocontact>>OtherAddressPostalCode
    	Tb_contacts.OtherAddressPostOfficeBox = Ocontact>>OtherAddressPostOfficeBox
    	Tb_contacts.OtherAddressState = Ocontact>>OtherAddressState
    	Tb_contacts.OtherAddressStreet = Ocontact>>OtherAddressStreet
    	Tb_contacts.OtherFaxNumber = Ocontact>>OtherFaxNumber
    	Tb_contacts.OtherTelephoneNumber = Ocontact>>OtherTelephoneNumber
     
    	//Yomi
    	Tb_contacts.YomiCompanyName = Ocontact>>YomiCompanyName
    	Tb_contacts.YomiFirstName = Ocontact>>YomiFirstName
    	Tb_contacts.YomiLastName = Ocontact>>YomiLastName
     
    	//Détails
    	Tb_contacts.Account = Ocontact>>Account
    	Tb_contacts.Anniversary = RéelVersDateHeure(Ocontact>>Anniversary)
     
    	Tb_contacts.AssistantName = Ocontact>>AssistantName
    	Tb_contacts.AssistantTelephoneNumber = Ocontact>>AssistantTelephoneNumber
    	Tb_contacts.BillingInformation = Ocontact>>BillingInformation
    	Tb_contacts.Birthday = RéelVersDateHeure(Ocontact>>Birthday)
    	Tb_contacts.Body = Ocontact>>Body
    	Tb_contacts.CallbackTelephoneNumber = Ocontact>>CallbackTelephoneNumber
    	Tb_contacts.CarTelephoneNumber = Ocontact>>CarTelephoneNumber
    	Tb_contacts.Categories = Ocontact>>Categories
    	Tb_contacts.Children = Ocontact>>Children
    	Tb_contacts.CreationTime = RéelVersDateHeure(Ocontact>>CreationTime)
    	Tb_contacts.CustomerID = Ocontact>>CustomerID
     
    	Tb_contacts.Department = Ocontact>>Department
    	Tb_contacts.FTPSite = Ocontact>>FTPSite
    	Tb_contacts.FullName = Ocontact>>FullName
    	Tb_contacts.Gender = Ocontact>>Gender
    	Tb_contacts.GovernmentIDNumber = Ocontact>>GovernmentIDNumber
    	Tb_contacts.Hobby = Ocontact>>Hobby
    	Tb_contacts.IMAddress = Ocontact>>IMAddress
    	Tb_contacts.Importance = Ocontact>>Importance
    	Tb_contacts.Initials = Ocontact>>Initials
    	Tb_contacts.InternetFreeBusyAddress = Ocontact>>InternetFreeBusyAddress
    	Tb_contacts.ISDNNumber = Ocontact>>ISDNNumber
    	Tb_contacts.JobTitle = Ocontact>>JobTitle
    	Tb_contacts.Language = Ocontact>>Language
     
     
    	Tb_contacts.ManagerName = Ocontact>>ManagerName
    	Tb_contacts.MiddleName = Ocontact>>MiddleName
    	Tb_contacts.Mileage = Ocontact>>Mileage
    	Tb_contacts.NickName = Ocontact>>NickName
    	Tb_contacts.OfficeLocation = Ocontact>>OfficeLocation
    	Tb_contacts.OrganizationalIDNumber = Ocontact>>OrganizationalIDNumber
    	Tb_contacts.PagerNumber = Ocontact>>PagerNumber
    	Tb_contacts.PersonalHomePage = Ocontact>>PersonalHomePage
    	Tb_contacts.PrimaryTelephoneNumber = Ocontact>>PrimaryTelephoneNumber
    	Tb_contacts.Profession = Ocontact>>Profession
    	Tb_contacts.RadioTelephoneNumber = Ocontact>>RadioTelephoneNumber
    	Tb_contacts.ReferredBy = Ocontact>>ReferredBy
    	Tb_contacts.Spouse = Ocontact>>Spouse
    	Tb_contacts.Suffix = Ocontact>>Suffix
    	Tb_contacts.TelexNumber = Ocontact>>TelexNumber
    	Tb_contacts.Title = Ocontact>>Title
    	Tb_contacts.TTYTDDTelephoneNumber = Ocontact>>TTYTDDTelephoneNumber
    	Tb_contacts.User1 = Ocontact>>User1
    	Tb_contacts.User2 = Ocontact>>User2
    	Tb_contacts.User3 = Ocontact>>User3
    	Tb_contacts.User4 = Ocontact>>User4
    	Tb_contacts.WebPage = Ocontact>>WebPage
     
     
     
     
    	Tb_contacts.EntryID = Ocontact>>EntryID
    	Tb_contacts.LastModificationTime = RéelVersDateHeure(Ocontact>>LastModificationTime)
    	Tb_contacts.FirstName = Ocontact>>FirstName
    	Tb_contacts.LastName = Ocontact>>LastName
     
     
     
     
    		SI PAS HAjoute(Tb_contacts) ALORS 
    		Erreur("Erreur HAjoute" + HErreur())
    	FIN
    	//Trace (Tb_contacts.LastName)
    	i++
    	FIN
     
    TableAffiche(Table_contacts,taRéExecuteRequete)
    Maintenant je voudrais faire l'inverse... écrire les fiches modifiées dans le fichier HF dans outlook et je coince...


    Aurriez-vous une idée, une piste... ?

    Merci d'avance

  2. #2
    Membre expert

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2004
    Messages
    2 329
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : France, Calvados (Basse Normandie)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 329
    Points : 3 841
    Points
    3 841
    Par défaut
    Bonjour,

    Un petit ContactModifie(..) ?

  3. #3
    Membre habitué
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Novembre 2007
    Messages
    297
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Technicien maintenance

    Informations forums :
    Inscription : Novembre 2007
    Messages : 297
    Points : 129
    Points
    129
    Par défaut
    Citation Envoyé par Lo² Voir le message
    Bonjour,

    Un petit ContactModifie(..) ?

    J'y ai pensé mais le problème c'est que la structure contact windev est limitée au niveau des membres.. Impossible par exemple d'utiliser les champs perso User1, User2, User3 ou User4...


    Seb

Discussions similaires

  1. [OL-2007] Synchro contacts outlook avec compte gmail (Outlook4gmail)
    Par XceSs dans le forum Outlook
    Réponses: 0
    Dernier message: 20/03/2013, 12h39
  2. Fichier des contact Outlook
    Par jumpers70 dans le forum Outlook
    Réponses: 0
    Dernier message: 18/08/2011, 15h00
  3. Réponses: 3
    Dernier message: 16/07/2008, 19h56
  4. Bdd gestion de contacts synchro avec outlook
    Par sebinator dans le forum Modélisation
    Réponses: 4
    Dernier message: 10/05/2008, 10h08
  5. Synchro Table Access et Contacts outlook
    Par sebinator dans le forum VBA Access
    Réponses: 0
    Dernier message: 30/04/2008, 15h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo