My Assistant
![]() ![]() |
|
|
Mar 12 2005, 04:44 PM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 73 |
Hi,
I have form where user enters bunch of information -one being email address.I want to have command button next to that field that when clicked opens Outlook Address Book (the form that shows Select Names when To is clicked in creating new email).Once that outlook form is displayed and user select email address ,that selection will populate field in my access form. Is any of this possible?I was told that is but I [censored] find anything on web on this. thanks for any help, lyn |
|
|
|
Mar 14 2005, 08:04 AM
Post
#2
|
|
|
New Member Posts: 1 |
why don't you just create a recordset of contacts from outlook itself?
Here's the code i have fornd for it: 'You will need to reference to Microsoft Active Data Object 2.x. Dim con As ADODB.Connection Dim rs As ADODB.Recordset Dim i As Long Set con = New ADODB.Connection Set rs = New ADODB.Recordset With con .ConnectionString = "Provider=Microsoft.JET.OLEDB.4.0;" & _ "Exchange 4.0;" & _ "MAPILEVEL=Outlook Address Book\;" & _ "PROFILE=Outlook;" &_ "TABLETYPE=1;" & _ "DATABASE=c:\temp" 'You'll need to change this! .Open End With With rs Set .ActiveConnection = con .CursorType = adOpenStatic .LockType = adLockReadOnly .Open "Select * from [contacts]" .MoveFirst Do While Not rs.EOF For i = 0 To rs.Fields.Count - 1 Debug.Print rs(i).Name + vbTab + Format(rs(i).Value) Next i rs.MoveNext Loop .Close End With Set rs = Nothing con.Close Set rs = Nothing |
|
|
|
Mar 14 2005, 03:19 PM
Post
#3
|
|
|
UtterAccess Enthusiast Posts: 73 |
Thanks for your suggestion.I tried it but I'am getting error
Run-time error '-2147467259(80004005)'; Mapi Folder or address book not found. I think it could be because of Last paramettar in connectstring Database -what should I put there , Thanks, Lyn |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 12:13 PM |