Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Outlook and SQL

Posted on 2000-04-13
3
Medium Priority
?
244 Views
Last Modified: 2010-05-18
I am programming Outlook using VBA and I want to know if I can have a live connection to a SQL table through custom fields.
I have about 25,000 contacts that I need to have available to network users at a reasonable speed.
Is this possible?
0
Comment
Question by:kcmc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:saile01
ID: 2713980
it's possible to use sql table for making outlook contact
but can you tell more information for why do you want to use the  field ?
it's for fill a list box or something else ?
for making search into your sql database ?

0
 

Accepted Solution

by:
ozrs earned 200 total points
ID: 2714105
You can write a class in the VBA project that retrieves data, and make it available to a form.

You could also write a COM addin that does the same thing (only it will be faster as it is precompiled), or you could use a Custom Form that queries the SQL database using ADO to fill a listbox.

There are some courses you can go on to learn about this - I'm currently sitting in one that is being taught by an excellent presenter...   1593A - Developing Collaborative Solutions Using Outlook2000...
0
 

Expert Comment

by:saile01
ID: 2715021
Set Lst1 = ExpPages("Message").Controls("LstBox")

set conn = Application.CreateObject("adodb.connection")

conn.ConnectionTimeOut = 180
conn.open "dsnName","username","pasword"
set rsDetail= Application.CreateObject("adodb.recordset")
set rsDetail=conn.execute("select login_fullname,login_email from inetusers where Login_Level=50")

Do Until RSdetail.EOF
  Lst1.additem rsDetail.Fields("Login_Email")
rSdetail.MoveNext
Loop

this little code connect to an sql database, make a select and fill and listbox with the email of person in the db
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read this checklist to learn more about the 15 things you should never include in an email signature.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question