Solved

Outlook and SQL

Posted on 2000-04-13
3
239 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 100 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

RoboForm Secure Password Management System

RoboForm Everywhere - Superb Browser Support
Windows / Apple / IOS / Android / Linux / Chrome OS
Use different complex passwords everywhere
Best Secure Password Management by far
Synchronize all of your devices instantly
Safe, Secure & Highly Recommended!

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

738 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