Results 1 to 4 of 4

Thread: Export Wizard

  1. #1
    Modell
    Guest

    Export Wizard

    Using Office 2000, I am trying to export Access FName, LName and email address into a mailing list "Students" which is in the "Contact" folder. The Wizard makes the transaction simple but the results are messy. All the names get sorted FName, LName and the whole export is imported to the Outlook "Contact" folder rather than the mailing list.
    I am very new to MS products and am probably missing some button that would make the transfer the way I need it. Can anyone suggest how I should proceed?
    Thank you. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  2. #2
    New Lounger
    Join Date
    Mar 2001
    Location
    Washington DC suburbs
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export Wizard

    Hi there!

    I have the habit of clipping/pasting interesting tidbits from the internet, and on my harddrive I found this that may help you. Unfortunately, I did not put in the URL from the source, but I think that it came from the Microsoft Knowledgebase website:

    Exporting a Microsoft Access Table into an Outlook Contacts Folder
    This section shows you how to add a list of contacts, stored in a Microsoft Access table, to your Outlook Contacts folder. It uses a subroutine, ExportContactsTable and a function, boolCheckName.
    The subroutine, ExportContactsTable, creates a new Outlook ContactItem object for each record in the table. It takes a table name as its only argument. The table should have the fields: ContactName, Address, City, Region, PostalCode, Country, Phone, Fax, CompanyName, ContactTitle, and CustomerId.
    In the sample table there is a field, CustomId, which does not correspond to any of Outlook's built-in fields. The subroutine creates a custom field for an Outlook ContactItem. This custom field will be available as a User-defined field in Outlook through the Field Chooser.
    The function, boolCheckName is called by ExportContactsTable to do some minimal checking of each contact name. It insures that the name is not a zero length string and that it does not already exist in the Outlook Contacts list. It returns True if the contact should be added to the Contact List.
    The sample code for this section as well as a sample table of contacts is in AccSamp.mdb. The code is in the modContacts module. To run this solution, open the database and click Export Contacts on the Samples form.
    Note Running the sample code adds thirteen contacts to your Outlook Contact List. However, each contact name added to your list is preceded with the word

  3. #3
    Modell
    Guest

    Re: Export Wizard

    Hello Al.
    Thanks for taking the time to respond to my plight. I read your solution three times and still don't understand most of it. I guess I am even too new at this to be at this forum.
    Modell <img src=/S/crybaby.gif border=0 alt=crybaby width=15 height=15>

  4. #4
    New Lounger
    Join Date
    Mar 2001
    Location
    Washington DC suburbs
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export Wizard

    Hi Modell!

    Naw... don't think that way! We've all ended up scratching our heads at
    some time or other. I personally haven't implimented that particular
    routine, but it looked like something that I would want to do in the future,
    so I saved it. It really is straight forward... But you know something? I
    found 2 other simpler methods, one definitely from the MSKB and the other
    from the textbook Programming Microsoft Access 2000. I'll present the
    (easier) one, which is the latter. It really cuts through the chase:

    Sub addContacts()
    Dim StudentsOutlook As Outlook.Application
    Dim myItem As ContactItem
    Dim rstl As New Recordset

    'Open the Contacts folder in Outlook
    Set StudentsOutlook = CreateObject("Outlook.Application")

    'Open the table with the new contacts.
    With rstl
    .ActiveConnection = CurrentProject.Connection
    .Open "StudentsAccess" 'your Access students table
    End With

    'Create a ContactItem for adding contactss and
    'loop through the table records to add them to the folder

    AssistantWorkingOn
    Do Until rst1.EOF
    Set myItem = StudentssOutlook.CreateItem(o1ContactItem)
    With myItem
    .FirstName = IIf(IsNull(rst1.Fields(0)), "", rst1.Fields(0))
    .LastName = rst1.fields(1)
    .EmailAddress = rst1.Fields(2)
    .Save
    End With
    rst1.MoveNext

    End Sub

    I think that this one is easier to use. Let me know if it works!

    Regards,

    Al

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •