![]() |
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
|
|||
|
|||
![]()
I have a list of names in an external file. Right now, it's an excel 2003
spreadsheet with separate columns for first name and last name, but I can just as easily put it into Access, Word, text/CSV, etc. Each name on the list corresponds to a contact in Outlook -- or it might not (some don't exist, and don't need to). I need a script or program that will compare the names *OR* File As fields of each contact in Outlook with the external list. It does not need to search any field other the names fields. If it doesn't exist, it can move on to the next one. But if a contact entry in Outlook DOES exist for that name, I need it to move the contact to another Outlook contacts folder. Or, at the very least, flag it or assign it to a category. Then I could always filter on that flag or category and move all of them at once by hand. I've been doing this manually, one by one, and I'm tired ![]() 3,800 names to get through, and I'm only on 1,219--after several hours of doing this. Anyone have any suggestions on how this can be done more efficiently? Is there a script or program that can do it? I'm very technically inclined (used to program, but it's been years and am not familiar with Outlook's object model), and don't mind something fairly complicated, but I desparately need to find some way to do this more efficiently/automated. Dan |
#2
|
|||
|
|||
![]() You can start with this. Please see the 'set c= ...' line, you need to complete that yourself. The VBA helpfile explains how to use the Find function, and there's already an example for searching for the FileAs field. sub compare() dim xl as excel.application dim wb as excel.workbook dim ws as excel.worksheet dim rn as excel.range dim f1 as outlook.mapifolder dim f2 as outlook.mapifolder dim items as outlook.items dim c as outlook.contactitem set xl=getobject(,"excel.application") set wb=xl.workbooks(1) set ws=wb.sheets(1) set rn=ws.range("a1") ' compare with this contacts set f1=application.session.pickfolder set items=f1.items ' move to this set f2=application.session.pickfolder while rn.value "" ' please complete this yourself... set c=items.find(...) if not c is nothing then c.move f2 ' move on to the next excel row set rn=rn.offset(1,0) wend end sub -- Best regards Michael Bauer - MVP Outlook : Outlook Categories? Category Manager Is Your Tool : VBOffice Reporter for Data Analysis & Reporting : http://www.vboffice.net/product.html?pub=6&lang=en Am Thu, 26 Mar 2009 10:44:17 -0700 schrieb Dan Trimble: I have a list of names in an external file. Right now, it's an excel 2003 spreadsheet with separate columns for first name and last name, but I can just as easily put it into Access, Word, text/CSV, etc. Each name on the list corresponds to a contact in Outlook -- or it might not (some don't exist, and don't need to). I need a script or program that will compare the names *OR* File As fields of each contact in Outlook with the external list. It does not need to search any field other the names fields. If it doesn't exist, it can move on to the next one. But if a contact entry in Outlook DOES exist for that name, I need it to move the contact to another Outlook contacts folder. Or, at the very least, flag it or assign it to a category. Then I could always filter on that flag or category and move all of them at once by hand. I've been doing this manually, one by one, and I'm tired ![]() 3,800 names to get through, and I'm only on 1,219--after several hours of doing this. Anyone have any suggestions on how this can be done more efficiently? Is there a script or program that can do it? I'm very technically inclined (used to program, but it's been years and am not familiar with Outlook's object model), and don't mind something fairly complicated, but I desparately need to find some way to do this more efficiently/automated. Dan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comparing an external list of names with contacts | Dan Trimble | Outlook - Using Contacts | 1 | March 26th 09 11:50 AM |
Distribution list versus contact entries | Jim D | Outlook - General Queries | 3 | October 28th 08 03:27 AM |
How to print list of journal entries by contact | Gabrielle | Outlook - Using Contacts | 0 | October 18th 07 05:54 AM |
Icons before the names in my contact list | churchadministrator | Outlook - Using Contacts | 1 | June 5th 07 07:21 PM |
Number of entries in a shared contact list | Steve1073 | Outlook - Using Contacts | 0 | March 23rd 07 09:20 PM |