Results 1 to 13 of 13
  1. #1
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20

    Can we synchronization between MS Outlook and MS Access?

    MS Outlook contacts to MS Access database table to get in,
    MS Outlook contacts to an Access data base?

  2. #2
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Quote Originally Posted by turk View Post
    MS Outlook contacts to MS Access database table to get in,
    MS Outlook contacts to an Access data base?

    My question is not understood?
    Do you have understood me?

  3. #3
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    I guessnosolution

  4. #4
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Is there a solution?

  5. #5
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20

    Do not have a solution

    I want to sync to Outlook from Access.
    Sample added. I hope to describe
    Attached Files Attached Files

  6. #6
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    Please attach full file

    What do you want to sync?????

    Please write in your field by EN

  7. #7
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Quote Originally Posted by uronmapu View Post
    Please attach full file
    What is the full file to add?
    The sample file at the project stage


    Quote Originally Posted by uronmapu View Post
    What do you want to sync?????
    MS Outlook contacts to MS Access database

    Quote Originally Posted by uronmapu View Post
    Please write in your field by EN
    I do not know English.
    would translate to google.translate.com Sorry for errors in translation.

  8. #8
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    I found the following codes to get the error message.
    How will the Solution?


    export Outlook items to Access

    Code:
    Sub ImportContactsFromOutlook()
    
       ' This code is based in Microsoft Access.
    
       ' Set up DAO objects (uses existing "tblContacts" table)
       Dim rst As DAO.Recordset
       Set rst = CurrentDb.OpenRecordset("tblContacts")
    
    
       ' 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 objItems As Outlook.Items
       Dim Prop As Outlook.UserProperty
    
       Set olns = ol.GetNamespace("MAPI")
       Set cf = olns.GetDefaultFolder(olFolderContacts)
       Set objItems = cf.Items
       iNumContacts = objItems.Count
       If iNumContacts <> 0 Then
          For i = 1 To iNumContacts
             If TypeName(objItems(i)) = "ContactItem" Then
                Set c = objItems(i)
                rst.AddNew
                rst!FirstName = c.FirstName
                rst!LastName = c.LastName
                rst!Address = c.BusinessAddressStreet
                rst!City = c.BusinessAddressCity
                rst!State = c.BusinessAddressState
                rst!Zip_Code = c.BusinessAddressPostalCode
                ' Custom Outlook properties would look like this:
                ' rst!AccessFieldName = c.UserProperties("OutlookPropertyName")
                rst.Update
             End If
          Next i
          rst.Close
          MsgBox "Finished."
       Else
          MsgBox "No contacts to export."
       End If
    
    End Sub
    import Outlook items from Access

    Code:
    Sub ExportAccessContactsToOutlook()
    
       ' Set up DAO Objects.
       Dim oDataBase As DAO.Database
       Dim rst As DAO.Recordset
       Set oDataBase = OpenDatabase _
          ("c:\Program Files\Microsoft Office\Office10\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 and close the contact.
             c.Save
             c.Close
    
             .MoveNext
          Loop
       End With
    
    End Sub

  9. #9
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Do not have one?

  10. #10
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    The difficulty is that ....

    I need too .....

    Everyone have any idea ????

  11. #11
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Problem solved
    Set up a reference to Outlook in the VBA editor-Tools-References?



    Quote Originally Posted by turk View Post
    I found the following codes to get the error message.
    How will the Solution?


    export Outlook items to Access

    Code:
    Sub ImportContactsFromOutlook()
    
       ' This code is based in Microsoft Access.
    
       ' Set up DAO objects (uses existing "tblContacts" table)
       Dim rst As DAO.Recordset
       Set rst = CurrentDb.OpenRecordset("tblContacts")
    
    
       ' 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 objItems As Outlook.Items
       Dim Prop As Outlook.UserProperty
    
       Set olns = ol.GetNamespace("MAPI")
       Set cf = olns.GetDefaultFolder(olFolderContacts)
       Set objItems = cf.Items
       iNumContacts = objItems.Count
       If iNumContacts <> 0 Then
          For i = 1 To iNumContacts
             If TypeName(objItems(i)) = "ContactItem" Then
                Set c = objItems(i)
                rst.AddNew
                rst!FirstName = c.FirstName
                rst!LastName = c.LastName
                rst!Address = c.BusinessAddressStreet
                rst!City = c.BusinessAddressCity
                rst!State = c.BusinessAddressState
                rst!Zip_Code = c.BusinessAddressPostalCode
                ' Custom Outlook properties would look like this:
                ' rst!AccessFieldName = c.UserProperties("OutlookPropertyName")
                rst.Update
             End If
          Next i
          rst.Close
          MsgBox "Finished."
       Else
          MsgBox "No contacts to export."
       End If
    
    End Sub
    import Outlook items from Access

    Code:
    Sub ExportAccessContactsToOutlook()
    
       ' Set up DAO Objects.
       Dim oDataBase As DAO.Database
       Dim rst As DAO.Recordset
       Set oDataBase = OpenDatabase _
          ("c:\Program Files\Microsoft Office\Office10\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 and close the contact.
             c.Save
             c.Close
    
             .MoveNext
          Loop
       End With
    
    End Sub

  12. #12
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    Could you upload file for demo?

  13. #13
    turk is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Türkiye
    Posts
    20
    Limited sample of the names I added to my table to be Turkish.
    Is it possible to export from Outlook, and the sample table to add here.
    I'd be happy to

    Sample download
    http://www.dosyayukle.in/do.php?id=3306

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-05-2012, 01:07 PM
  2. Synchronization between forms
    By mnsemple83 in forum Forms
    Replies: 5
    Last Post: 07-13-2011, 10:47 AM
  3. VB code for replication synchronization?
    By Eviscerator in forum Programming
    Replies: 0
    Last Post: 08-12-2010, 08:57 AM
  4. subform synchronization
    By bkelly in forum Forms
    Replies: 2
    Last Post: 09-25-2009, 04:51 PM
  5. Replication/ synchronization via Internet
    By khuram in forum Access
    Replies: 0
    Last Post: 07-29-2009, 04:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums