Solved

Outlook and SQL

Posted on 2000-04-13
3
229 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
  • 2
3 Comments
 

Expert Comment

by:saile01
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
Use email signature images to promote corporate certifications and industry awards.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now