![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Thanks for taking the time to read my question.
I've done quite a bit of coding in MS Access and Excel, but never in Outlook. I'd like to export all the items in the GAL to something like an Excel file, or even a .csv. I have no idea where to start or finish. I've been looking on line for a while but haven't found anything I understand. I'm self taught in VBA, and know enough to get done what I need to. Any help would be really appreciated. Brad |
Ads |
#2
|
|||
|
|||
![]()
You might want to start with the sample at http://www.outlookexchange.com/artic...agaev_c1p2.asp, which uses ADSI, not Outlook.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Brad" wrote in message ... Thanks for taking the time to read my question. I've done quite a bit of coding in MS Access and Excel, but never in Outlook. I'd like to export all the items in the GAL to something like an Excel file, or even a .csv. I have no idea where to start or finish. I've been looking on line for a while but haven't found anything I understand. I'm self taught in VBA, and know enough to get done what I need to. Any help would be really appreciated. Brad |
#3
|
|||
|
|||
![]()
Here is what I have so far. How do I get all the other e-mail address
associated with each entry? Thanks, Brad Sub GetGAL() Dim x As Integer Dim gal As String On Error GoTo GetGAL_Err Set myAddressList = Application.Session.AddressLists("Global Address List").AddressEntries Open "C:\Documents and Settings\Mcintybd\Desktop\EmailInfo.txt" For Output As #1 ' Open file for output. x = 1 Do Until x = 4000 Print #1, myAddressList(x).Details 'Debug.Print NextItem x = x + 1 Loop Close #1 GetGAL_Exit: Exit Sub GetGAL_Err: MsgBox Err.Number & ", " & Err.Description If Err.Number = 55 Then Close #1 Resume Else Resume GetGAL_Exit End If End Sub "Sue Mosher [MVP-Outlook]" wrote: You might want to start with the sample at http://www.outlookexchange.com/artic...agaev_c1p2.asp, which uses ADSI, not Outlook. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Brad" wrote in message ... Thanks for taking the time to read my question. I've done quite a bit of coding in MS Access and Excel, but never in Outlook. I'd like to export all the items in the GAL to something like an Excel file, or even a .csv. I have no idea where to start or finish. I've been looking on line for a while but haven't found anything I understand. I'm self taught in VBA, and know enough to get done what I need to. Any help would be really appreciated. Brad |
#4
|
|||
|
|||
![]()
Short answer: You don't. The data you can return with Outlook objects is limited to the Exchange address, the user name, and the manager name.
That's why I suggested that you use ADSI/LDAP. In that other sample, this is the statement that tells the script what to export: com.CommandText = "select givenname, sn,objectCategory,objectClass, mail,msExchHideFromAddressLists _ & from '" & LDAPQUERY & "' where objectClass= 'user' order by sn " _ & or objectClass= 'contact' order by sn" An ADSI/LDAP reference or the microsoft.public.exchange.development newsgroup can probably help you out with the other field names you might be looking for. It's not information I have at my fingertips here, since it's not directly Outlook related. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Brad" wrote in message ... Here is what I have so far. How do I get all the other e-mail address associated with each entry? Thanks, Brad Sub GetGAL() Dim x As Integer Dim gal As String On Error GoTo GetGAL_Err Set myAddressList = Application.Session.AddressLists("Global Address List").AddressEntries Open "C:\Documents and Settings\Mcintybd\Desktop\EmailInfo.txt" For Output As #1 ' Open file for output. x = 1 Do Until x = 4000 Print #1, myAddressList(x).Details 'Debug.Print NextItem x = x + 1 Loop Close #1 GetGAL_Exit: Exit Sub GetGAL_Err: MsgBox Err.Number & ", " & Err.Description If Err.Number = 55 Then Close #1 Resume Else Resume GetGAL_Exit End If End Sub "Sue Mosher [MVP-Outlook]" wrote: You might want to start with the sample at http://www.outlookexchange.com/artic...agaev_c1p2.asp, which uses ADSI, not Outlook. "Brad" wrote in message ... Thanks for taking the time to read my question. I've done quite a bit of coding in MS Access and Excel, but never in Outlook. I'd like to export all the items in the GAL to something like an Excel file, or even a .csv. I have no idea where to start or finish. I've been looking on line for a while but haven't found anything I understand. I'm self taught in VBA, and know enough to get done what I need to. Any help would be really appreciated. Brad |
#5
|
|||
|
|||
![]()
Aaaaahhhhh I get it.
Thanks so much for your help Sue. Have a great day, Brad "Sue Mosher [MVP-Outlook]" wrote: Short answer: You don't. The data you can return with Outlook objects is limited to the Exchange address, the user name, and the manager name. That's why I suggested that you use ADSI/LDAP. In that other sample, this is the statement that tells the script what to export: com.CommandText = "select givenname, sn,objectCategory,objectClass, mail,msExchHideFromAddressLists _ & from '" & LDAPQUERY & "' where objectClass= 'user' order by sn " _ & or objectClass= 'contact' order by sn" An ADSI/LDAP reference or the microsoft.public.exchange.development newsgroup can probably help you out with the other field names you might be looking for. It's not information I have at my fingertips here, since it's not directly Outlook related. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Brad" wrote in message ... Here is what I have so far. How do I get all the other e-mail address associated with each entry? Thanks, Brad Sub GetGAL() Dim x As Integer Dim gal As String On Error GoTo GetGAL_Err Set myAddressList = Application.Session.AddressLists("Global Address List").AddressEntries Open "C:\Documents and Settings\Mcintybd\Desktop\EmailInfo.txt" For Output As #1 ' Open file for output. x = 1 Do Until x = 4000 Print #1, myAddressList(x).Details 'Debug.Print NextItem x = x + 1 Loop Close #1 GetGAL_Exit: Exit Sub GetGAL_Err: MsgBox Err.Number & ", " & Err.Description If Err.Number = 55 Then Close #1 Resume Else Resume GetGAL_Exit End If End Sub "Sue Mosher [MVP-Outlook]" wrote: You might want to start with the sample at http://www.outlookexchange.com/artic...agaev_c1p2.asp, which uses ADSI, not Outlook. "Brad" wrote in message ... Thanks for taking the time to read my question. I've done quite a bit of coding in MS Access and Excel, but never in Outlook. I'd like to export all the items in the GAL to something like an Excel file, or even a .csv. I have no idea where to start or finish. I've been looking on line for a while but haven't found anything I understand. I'm self taught in VBA, and know enough to get done what I need to. Any help would be really appreciated. Brad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
? posting an item from Address Book [Global Address List] to a specific form and folder | luckily | Outlook - Using Forms | 3 | September 11th 06 10:01 PM |
How to print Global Address List, or export to Contacts List? | Duane | Outlook - Using Contacts | 1 | August 11th 06 01:51 AM |
Extract email addresses from Distribution LIst in Global Address List | tthomas | Outlook and VBA | 2 | June 22nd 06 12:02 AM |
Can I export a Global Address List to Excel? | Josh Craig | Outlook - Using Contacts | 2 | March 14th 06 01:30 PM |
global global address list | FrankML | Outlook - Using Contacts | 1 | March 7th 06 10:02 AM |