How can I do a Find & Replace in Address Book?

     I asked this question in a different forum & they suggested I post the same question here because someone might have an Apple Script?! 
Here is the link:  https://discussions.apple.com/community/feeds/messages?thread=3187576 but to keep things simple, I want to find certain words and phrases in the note section of my address book and update those to something else.  How can I accomplish this?
I have tried exporting and using numbers to make the changes but when I re-import those changes back to address book I get a huge mess of information.  Duplicate contacts and triplicate notes to say the least.  A suggestion was made to export ALL the information in the address book and then re-import it ( I was only exporting the names & notes previously ).  That poses new problems such as how to keep my custom categories in tacked.  Most of my contacts have things such as, 'John's Cell' and 'Susan's Work E-mail'.
Thanks in Advance!
R

The basic idea is as follows:
set keyWords to {"word 1", "word 2", "phrase 3"}
repeat with thisWord in kewWords
          tell application "Address Book"
                    set p to (every person whose note contains thisWord)
  -- modify the text - depends on what you're trying to do
          end tell
end repeat
exactly what code you need to modify the text will depend on how you want to modify it, but the basic idea will be something like (using text item delimiters):
          tell application "Address Book"
                    set q to my tid(p's note, thisWord)
                    set p's note to my tid(q, replacementText)
          end tell
on tid(input, delim)
          set {oldTID, my text item delimiters} to {my text item delimiters, delim}
          if class of input is list then
                    set output to input as text
          else
                    set output to text items of input
          end if
          set my text item delimiters to oldTID
          return output
end tid

Similar Messages

  • How can I change several prefixes in my Address Book?

    Hello,
    I been trying change several prefixes on my Address Book with no luck.
    I tried exporting them as Bussines Cards and editing them with Text Edit and I was unsuccesful. Due that the find tool wont "find" what I am looking for.
    At the end of the day is only replacing the following in a bunch of contacts:
    +54911
    for
    011
    Any help would be much apreciated.
    Thanks in advance
    Lucho

    Hello, I think you'll have to Export them & use another Application...
    How to Export Your Mac OS X Mail Address Book Contacts to a CSV File...
    Export Your Mac OS X Mail Address Book Contacts to a CSV File
    To save your contacts from the Mac OS X Address Book to a CSV (comma-separated values) file, which lets you import the data to many other address books:
    Download and install AB2CSV.
    Open AB2CSV.
    Select Mode | CSV from the menu.To configure which fields will be exported, you can select AB2CSV | Preferences… from the menu and go to the CSV tab.
    Now select File | Export from the menu.
    Go to your Documents folder.
    Click Choose.
    The exported address book contacts are saved to a file called "everyone.csv" in your Documents folder.
    http://email.about.com/od/macosxmailtips/qt/How-To-Export-Your-Mac-Os-X-Mail-Add ress-Book-Contacts-To-A-Csv-File.htm
    Then again, AB can be imported into...
    Might look into NeoOffice...
    http://www.neooffice.org/
    Or Open Office...
    http://porting.openoffice.org/mac/download/index.html
    And most likely MS Office.

  • How can I copy the contents of an address book group

    Does anyone know how I can copy the entire contents of an Address Book group and paste the results into an e-mail to send to others? When I select the group and then the "copy" tool, it copies only the first address in the group. If I select "select all", it selects all e-mail addresses everywhere, not just the ones in the intended group.

    He did not want to add them all to his address book; he simply wanted to have my long list of staff email addresses without having to type it or create it himself, like this: [email protected], [email protected], [email protected], [email protected], etc. We used to use an email application called Eudora which allowed you to copy and paste group lists as though they were just text characters. With Mail (and Address Book), everything is connected to everything else and a group list is actually a set of flagged contacts from your "All Contacts" list.

  • How can I change the fonts in my address book? I'd like to change them to make fun mailing labels.

    How can I change fonts in my address book so I can print clever mailing labels?

    Hello, I think you'll have to Export them & use another Application...
    How to Export Your Mac OS X Mail Address Book Contacts to a CSV File...
    Export Your Mac OS X Mail Address Book Contacts to a CSV File
    To save your contacts from the Mac OS X Address Book to a CSV (comma-separated values) file, which lets you import the data to many other address books:
    Download and install AB2CSV.
    Open AB2CSV.
    Select Mode | CSV from the menu.To configure which fields will be exported, you can select AB2CSV | Preferences… from the menu and go to the CSV tab.
    Now select File | Export from the menu.
    Go to your Documents folder.
    Click Choose.
    The exported address book contacts are saved to a file called "everyone.csv" in your Documents folder.
    http://email.about.com/od/macosxmailtips/qt/How-To-Export-Your-Mac-Os-X-Mail-Add ress-Book-Contacts-To-A-Csv-File.htm
    Then again, AB can be imported into...
    Might look into NeoOffice...
    http://www.neooffice.org/
    Or Open Office...
    http://porting.openoffice.org/mac/download/index.html
    And most likely MS Office.

  • How can I copy my FF e-mail address book to newly installed T-Bird?

    Win7, 32bit, PC. I'm moving to a new ISP (i.e. from BT to Plusnet). I've been using Firefox as both browser and e-mail client but to help me maintain clarity I want to use T-Bird as e-mail client. I would like to copy my address book from Firefox to Thunderbird but cannot find out how to do it. Can you help, please?

    Hello Humsh!
    Not sure if I got your question correctly. I believe you were using Firefox to access a webmail from your current ISP (as far as I know Firefox has no built-in mail client)?
    If your provider was BT (as you mentioned above) you need to export your address book and then import it to Thunderbird. I've check that BT uses Yahoo mail as backend (bt.yahoo.com) and their instructions on exporting contacts' list can be found here: http://help.yahoo.com/l/us/yahoo/mail/yahoomail/manage/manage-10.html
    Once exported, in Thunderbird go to '''Tools|Import''' and follow instruction on the screen. Also you might need to configure your Thunderbird to use configuration from your new ISP first. Check this help pages:
    https://support.mozillamessaging.com/en-US/kb/switching-thunderbird
    https://support.mozillamessaging.com/en-US/kb/switching-thunderbird#w_switching-from-web-based-email-applications-to-thunderbird
    https://support.mozillamessaging.com/en-US/home
    Hope above can help you move to Thunderbird smoothly!
    Cheers!

  • How can I block the access to my address book?

    So yeah, the title says it. I actually wanna know how to manage the access of apps to my address book. Just like the location services.
    Is there any control panel? I was googling and searching on my iPhone but couldn't find anything.
    albin

    Yes, I am. But this example with Instagram doesn't sound like asking for permissions to me. I think that any app can load the contact list in the background and no one would notice it. I mean this is not right. However, it seems like I can't do anything. So yeah, thank you guys for your support.

  • How can I remove notes from contacts in Address Book?

    I have tried removing notes from the bottom part of my Address Book contacts, but when I highlight what I want to remove, and then press the delete button, the deleted portion disappears AND THEN REAPPEARS seconds later!
    How can I delete these notes permanently?

    There are two possibilities you can try:
    1. Delete all your duplicate entries. You can try downloading and running this Applescript Remove Duplicates, which will create a group named Duplicates in Address Book, from which you should be able to delete those entries, by selecting the Group, then in the next column to the Right, select all the entries and choose Delete Cards from the Edit menu.
    2. If that doesn't work, you can do this:
    1. Quit Address Book if it's running.
    2. Go to ~/Library/Application Support/AddressBook and delete an of these files/folders you find there:
    • ABPerson.skIndex
    • ABPerson.skIndexInverted
    • Address Book - xxxxx.abbu
    • AddressBook.data
    • AddressBook.data.beforesave
    • AddressBook.data.previous
    • Images
    • LastImport.plist
    3. Restart Address Book and see if the default cards are there (Apple card, and your Me card) and if all seems to be working correctly.
    Mulder

  • How can I delete all my contacts in Address Book?

    I had syncing issues between my Entourage 2008 contacts, my Address Book contacts, and the PowerMac for Blackberry application. As a reference, I have around 5,000 contacts. I have solved the issue, but there is some collateral damage: read on.
    Address Book duplicated my contacts two or three times, and it also created around 60,000 empty contacts. I have been able to clean the Entourage contacts, which only suffered from duplication but not from new empty entries.
    I tried to delete the Address Book duplicate and empty entries. The easy way out, I thought, was to Select All and delete. It does not work. Given I have ended with around 80,000 contacts, after I Select All, and try to delete, the program hangs, and I have to Force Quit the Address Book application.
    I tried to locate the Address Book file where contacts are stored, but I have not found an obvious name that would point to it, nor have I read anything about such file in the different discussion forums. So no success on this.
    I have even used scripts in the past for deleting duplicates and merging contacts in Entourage, but I have not found one for Address Book that could take care of the massive number of empty entries with "No Name".
    So, is there a way to delete all my contacts in Address Book?

    There are two possibilities you can try:
    1. Delete all your duplicate entries. You can try downloading and running this Applescript Remove Duplicates, which will create a group named Duplicates in Address Book, from which you should be able to delete those entries, by selecting the Group, then in the next column to the Right, select all the entries and choose Delete Cards from the Edit menu.
    2. If that doesn't work, you can do this:
    1. Quit Address Book if it's running.
    2. Go to ~/Library/Application Support/AddressBook and delete an of these files/folders you find there:
    • ABPerson.skIndex
    • ABPerson.skIndexInverted
    • Address Book - xxxxx.abbu
    • AddressBook.data
    • AddressBook.data.beforesave
    • AddressBook.data.previous
    • Images
    • LastImport.plist
    3. Restart Address Book and see if the default cards are there (Apple card, and your Me card) and if all seems to be working correctly.
    Mulder

  • How can I copy a mailing list into address book without having to type them individualy

    Hi
    I have a mailing list and I would like to send emails to everyone on the list in one go, I copied and pasted the list into my email, but can I have this group somewhere so that I can just call it up like an ordinary address from the address book, preferably without having to type every name individualy into the address book. I tried making a group in the address book and pasting the list in without success,if this is possible can some explain how I can acheive this
    Thankyou
    Richard

    Richard,
    Unfortunately, you have to add them one at a time - wait a sec... oh, yeah, if the contact is in your contact list it will 'auto-fill' as you begin to type. So if I want Wendy Whatshername, all I have to do is type Wen and the contacts will show up for you to select and auto-fill the name and email address.
    Hope this helps,
    Clinton

  • How can I print out a small size address book in Leopard?

    How can I print out my address book in Leopard, preferably in pocket size and preferably
    without each card having a separate page?

    First off, you've posted in the Tiger forum, even though your profile says you're running Snow Leopard. Even worse, you're asking about Leopard. You need to be sure you post your questions in the corrrect forum.
    As for the question itself, all you have to do is select the Group you want to print in Address Book, choose Print, select 'Pocket Address Book' from the pop-up Style menu, check the attributes you want included for each contact, and the paper size you want to use and Print.

  • How can I import iPhone contacts into Mac Address book

    I recently purchased a MacBook Pro and am in the process of trying to dump my Windows PC.
    All of my important contacts are on my iPhone. How can I get those contacts into my Mac Address Book?
    The same question goes for the music (ripped from CD) and my video files that are on my iPhone? The media is not that big of a deal because I can easily transfer it from my PC to my Mac but I assume I am not the only one in the world trying to do this and that Apple would make it very easy for MSFT Windows users to easily migrate to Macs.
    I must be an idiot but I don't see any option in iTunes to transfer the data from my iPhone into iTunes and/or the Address Book.
    Thanks

    The iPhone's primary function is NOT a word processor or a spread sheet analyzer.
    I didn't say, nor was I trying to imply ANYTHING of the sort. You should read what I provided again a little slower and in it's entirety, not taking this out of context, which you made into Apples and Oranges.
    It IS an iPod, a device designed to store and play music (in addition to being a browser and a phone).
    It is a phone, an iPod, and an internet device, which supports transferring iTunes content from iTunes on a single computer ONLY.
    Making it difficult to transfer my legal music from my iPhone to my Mac does not make me want to go out and buy more Apple products or Apple software.
    Good, then don't - no skin off my back. I couldn't care less if you want to remain a Windows sufferer. All this doesn't come from Apple. Much of it comes from those who OWN the distribution rights for content sold thru the iTunes Store.
    All of Apple's commercials imply how easy the user experience is over Windows. Well, in this case, they missed the boat BIG TIME!
    Everyone is entitled to their opinion, but let me get this straight. You will likely need to transfer much more than just music from your Windows PC to your Mac and if so, how do you plan on accomplishing this? If you are transferring Word and Excel files, photos, and any other data, you won't be using an iPhone for this, so I don't see the big deal with transferring your iTunes library along with all other data being transferred.
    I understand that the iPhone was not designed to be used as a backup. However, you allow the contacts to be merged in but not the music that I legally installed (but didn't purchase from the iTunes store).
    I don't allow anything - this is a user to user help forum only.
    As I provided in my first post in this thread - the sync process for contact information, calendar events, and bookmarks with an iPhone is bidirectional with the supported application on your computer. This is a sync process by definition of syncing - which is not the same for other data such as iTunes content and photos transferred from your computer to your iPhone.
    http://support.apple.com/kb/HT1296
    Apple wants to make it difficult unless I purchased the music from iTunes.
    No, Apple or really those who own the distribution rights or the copyright holders for content sold thru the iTunes Store wants to make this difficult. Content sold thru the iTunes Store is set up by Apple to be a break even - which is included with the Apple stockholder's report. Apple makes their profit via sales of the iPod and iPhone. The bulk of the iTunes Store revenue goes to those who own the distribution rights or the copyright holders for the content.
    In addition, if my hard disk suffered a crash and I lost all my music it just seems stupid not to be able to pull it off my iPhone (yes, I know data should be backed up on a different drive, and mine is, but I am sure a lot of people do not back up their data).
    Maintaining a backup of your data is important for this very reason, and for other reasons which is not Apple's responsibility. I believe iTunes includes an occasional warning message to backup your iTunes library (which can be turned off), and iTunes includes an option to transfer content purchased from the iTunes Store from an iPod or iPhone - since the overwhelming majority of this content includes DRM protection required by those who own the distribution rights or the copyright holders.
    The iPhone was not designed as an external storage device or as a backup device - end of story. If someone chooses not to maintain a backup, they are playing Russian roulette with their data. Maintaining a backup is important regardless the platform, but even more so when running Windows with constant virus, adware, and spyware concerns.

  • How can I restore two folders in my address book that were accidently deleted?

    I attempted to delete a contact from my personal address book in Thunderbird. Some how two other groups (sub folders?) of addresses were listed below it and they disappeared too. How can I restore them. W7 system.

    abook.,mab is the personal address book... but don't be to sure your Norton product even backs up Thunderbird.... Microsoft promised their transfer wizard transferred your mail and it only does Microsoft Mail programs unless you edit it's advanced settings.

  • How can I efficiently bulk delete cards from Address Book?

    Hi,
    I'm using Scripting Bridge to do bulk updates to Address Book. 
    In doing this, I've discovered that deleting cards is extremely slow.  Is there anything that I can do that would allow me to delete many cards efficiently?
    Thanks in advance,
    Tony

    Hi,
    I'm using Scripting Bridge to do bulk updates to Address Book. 
    In doing this, I've discovered that deleting cards is extremely slow.  Is there anything that I can do that would allow me to delete many cards efficiently?
    Thanks in advance,
    Tony

  • How can i synchronize the data from PDA (address book and calendar) with AP

    I�m yang J2ME programmer. I�m just programming an API. I need to synchronize the data from PDA or mobile phone (address book and calendar) with PCs .
    Is the JSR 75 s right way? or JSR 230?
    Where can i download JSR 230 ? not PDF

    Can somebody help me?
    I mean, i want to read address book from cell phone to PC.
    Message was edited by:
    cash_ye

  • How can I make Mail show name of address book group in to field?

    In my address book I have a group named "family." When I send email to that group, I want the "to" field to show "family." Instead, it shows the whole list, every name and address. I can put them into the BCC field, but I'd rather just show the group name in the "to" field.

    The column divider is still there. Widen the entire window first, then change column width.

Maybe you are looking for

  • Error in Billing Document creation in case of STO !!

    Hi Friends, I am facing one error While Creating billing document (With combination of STO billing document type and STO delivery type )against outbound delivery in case of STO system is giving error msg The Item is not relevant to Billing Need your

  • What sequence settings for SD DCVpro50 squeezed ?

    I'm just getting a massive black boarder around my clips using easy setup. Any ideas ? Cheers -matt

  • [ADF] Query panel advanced search - starts with

    Hi all I have a query panel with an attribute which has an Attached LOV. The operator is defined as "Equals" in the View criteria The attribute is behaving properly View image: 1 but when switched to advanced mode and "starts with" operator selected,

  • League of Legend's Air Debug luncher error!

    Ok I am desprate here, after a really long time of searching for a proper solution for this problem and after spending money for it I came here to post cause I simply do not know what the hell is happening. I have few free time in my days as a archit

  • Problema premiere pro

    ho un problema con premiere pro, con versione più recente della 6.0 non riesco a far funzionare la mia scheda pinnacle dc 1000 come mai? è un problema di driver o del premiere pro? grazie