Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

Sujet : Outlook et Access 2000 [ Archives Visual Basic / API ] (taz)

vendredi 28 avril 2000 à 15:10:31 | Outlook et Access 2000

taz

Comment exporter ou importer les informations du calendrier d'Outlook 2000 ans Access 2000

vendredi 19 mai 2000 à 17:11:27 | Re : Outlook et Access 2000

Xavier


Salut taz,

Voici la copie d'un article de la base de connaissance MS.
J'espere que cela resoudra tes problemes.

A+
Xavier


PSS ID Number: Q208232
Article last modified on 12-04-1999

WINDOWS:2000

WINDOWS


======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Outlook 2000
- Microsoft Access 2000
-------------------------------------------------------------------------------

SUMMARY
=======

This article provides an overview and sample code for creating Microsoft Outlook
contacts from information stored in a Microsoft Access database. The sample code
in the More Information section of this article should be run from a Microsoft
Access global module and provides a starting point for the development of a
complete solution.

MORE INFORMATION
================

The Import and Export feature in Outlook does not allow you to import or export
information in user-defined fields (or properties). To import information into
these fields, you may need to create a programming solution that uses Automation
to convert the information.

The following sample code specifically converts information from Access into
newly-created Outlook contacts, using Data Access Objects (DAO). With
modifications, you can use this code as a basis for creating other types of
Outlook items, such as appointments, notes, tasks, and such.

There is also an overview and separate code example available on the Microsoft
Web site at the following location. It is the first example in the whitepaper.

http://www.microsoft.com/officedev/articles/sampauto.htm

Programming Considerations
--------------------------

- The following sample code uses the Northwind database included with Access
2000. If you installed Microsoft Office to a location other than the default,
be sure to change the path to the database in the sample code.
- You need to set a reference to the Microsoft Outlook 9.0 Object Library. A
reference to the Microsoft DAO 3.6 Object Library should be set by default.
- The field types used in this example are text, in both Access and Outlook. To
convert other types of fields, you must modify the code appropriately.
- The contacts are automatically placed in the default Contact folder, which is
at the same level as the Inbox.
- The CreateItem method used in this example creates a new Outlook contact
using the default form for the default contact folder. If you created a
custom Outlook Contact form, you must set the MessageClass field for each
item to the name of your custom form.

Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied
warranties of merchantability and/or fitness for a particular purpose. This
article assumes that you are familiar with the programming language being
demonstrated and the tools used to create and debug procedures. Microsoft
Support professionals can help explain the functionality of a particular
procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have
limited programming experience, you may want to contact the Microsoft fee-based
consulting line at (800) 936-5200. For more information about the support
options available from Microsoft, please see the following page on the World
Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp

Sample Code
-----------

Sub ExportAccessContactsToOutlook()

' Set up DAO Objects.
Dim oDataBase As Database
Dim rst As Recordset
Set oDataBase = OpenDatabase _
("c:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb")
Set rst = oDataBase.OpenRecordset("Customers")

' Set up Outlook Objects.
Dim ol As New Outlook.Application
Dim olns As Outlook.Namespace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.ContactItem
Dim Prop As Outlook.UserProperty

Set olns = ol.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)

With rst
.MoveFirst

' Loop through the Microsoft Access records.
Do While Not .EOF

' Create a new Contact item.
Set c = ol.CreateItem(olContactItem)

' Specify which Outlook form to use.
' Change "IPM.Contact" to "IPM.Contact.<formname>" if you've
' created a custom Contact form in Outlook.
c.MessageClass = "IPM.Contact"

' Create all built-in Outlook fields.
If ![CompanyName] <> "" Then c.CompanyName = ![CompanyName]
If ![ContactName] <> "" Then c.FullName = ![ContactName]

' Create the first user property (UserField1).
Set Prop = c.UserProperties.Add("UserField1", olText)

' Set its value.
If ![CustomerID] <> "" Then Prop = ![CustomerID]

' Create the second user property (UserField2).
Set Prop = c.UserProperties.Add("UserField2", olText)

' Set its value and so on....
If ![Region] <> "" Then Prop = ![Region]

' Save the contact.
c.Save

.MoveNext
Loop
End With

End Sub

REFERENCES
==========

For additional information about available resources and answers to
commonly-asked questions about Microsoft Outlook 2000 solutions, please see the
following article in the Microsoft Knowledge Base:

Q146636 OL2000: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol2000 OL2K

======================================================================
Keywords : kbcode kbprg kbdta OffVBS
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto
=============================================================================
Copyright Microsoft Corporation 1999.


-------------------------------
Réponse au message :
-------------------------------

Comment exporter ou importer les informations du calendrier d'Outlook 2000 ans Access 2000
-------------------------------

mardi 20 janvier 2004 à 17:57:01 | Re : Outlook et Access 2000

saraly


Bjr TT le monde
Voila, je suis en train de faire une appli sous access(VBA) qui importe et exporte des données depuis un fichier txt vers l'agenda d'Outlook et vice versa.
Mon probleme c'est que on me demande de personnalisé le formulaire calendrier.
J'arrive depuis outlook a modifié le formulaire en y rajoutant de nouveaux onglets contenant mes nouveaux champs

MAIS !!!! .... je ne sais pas comment faire une correspondance entre mes champs sources(données sources ) et les nouveaux champs outlook(champs du formulaire modifié (2 eme onglet du formulaire))

D'ailleurs, je ne suis mme pas sûr que c'est comme ça que je dois proceder

Merci de m'aider



Cette discussion est classé dans : outlook, access


Répondre à ce message

Sujets en rapport avec ce message

liaison outlook et access [ par boris ] Bonjour,je souhaite lier un formulaire Outlook97 avec une base de donnée Access ?Est-possible et comment ?Merci,Boris Consulter une base Access depuis Outlook via MAPI [ par David ] Hola, je desire consulter une base access regroupant des infos (mail, nom, prenom.....). Cette base fait office d'un carnet d'adresses.Je voudrais pou import/export automatisé entre outlook et access [ par raphaelle37 ] Bonjour à tous,J'ai a realiser une procedure qui automatise l'import / export des carnets d'adresses entre outlook2000 et access2000.On fait interveni ACCESS ET OUTLOOK [ par pepe013 ] pépéQuestion :J'ai des contacts dans une base access et j'aimerais les envoyer dans le carnet d'adresse d'outlook. comment faire ? Synchroniser une table access avec les contact outlook. [ par jff27 ] J'ai une table client (Nom, prenom, adresse etc...)Aprés une saisie de client, il faudrait qu'il apparaise dans les contact outlook.Peut on vraiment p liaison entre outlook et access [ par snoop ] je cherche à récuperer tous les mails entrant dans outlook et les stockés dans access , de préférence par code VBA.Mon majeur problème est de ne pas p ACCESS -->OUTLOOK [ par Taximars2 ] Salut,J'aimerais connaitre quelles sont les methodes (à partir de VB) pour récuperer des informations se trouvant dans un dossier public d'Outlook 200 importer contact de access 97 vers outlook 97 [ par rollingboy ] Bonjour,Est-il possible de récupérer une liste de contact contenu dans une base de données access 97 vers un dossier perso outlook 97?Si oui Comment d aide pour passer de access vers outlook - merci d'avance pour votre aide - [ par loiclb ] Bonjour tt le monde,Voilà, je suis en 1ère année de BTS gestion info. et j'étudi visual basic, et g commencé mon 1er projet en entreprise...IL faut qu CALENDRIER OUTLOOK --> access [ par toutinfo ] Je suis tres interessé par le code VBA qui permet de récupérer les RCV du calendrier Outlook dans Access.Je vois que tu as peut etre ça sur VB France.


Nos sponsors

Sondage...

CalendriCode

Décembre 2008
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

Téléchargements

Logiciels à télécharger sur le même thème :



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel BAÏSE, Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,296 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.