Address Books policies

We need to expose 5 distribution groups only to a select group of users, but since all users can see the GAL they appear for everyone. Hiding the distribution groups just hides them from everyone.
I tried using a custom attribute with an address list for these distro groups, and that actually works great, they appear in the custom address list.... but they still also appear in the GAL which everyone can see.
How can we hide/remove them from the GAL but not the custom address list? Or how to create them so that they don't go to the GAL at all?

Hi,
If you want to just restrict these 5 distribution groups only available for specific senders using, we can achieve it by configuring the
Accept Messages From setting in the Message Delivery Restrictions, and specifying mail-enabled groups who are allowed to send to the list. This method can limit distribution group using but it can’t limit distribution group visible in GAL.
For details, please refer to the following article:
http://exchangeserverpro.com/restrict-distribution-group-exchange-server-2010/
If you want to create a custom Global Address List for specific users, we need to use address book policy to achieve it. We can
divide your organizations into two parts: A specific group users who can view 5 distribution groups and other users who can’t view 5 groups by using
CustomAttribute15 parameters. Then create custom address book policy for two parts users respectively. Here are some deployment scenarios about it:
http://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
Hope it helps.
Thanks,
Winnie Liang
TechNet Community Support

Similar Messages

  • Room Finder not working with Address Book Policies

    Hi,
    I have an issue with Room Finder and Address Book Policies whereby when a mailbox user is apart of an ABP they cannot see any rooms within the room finder in Outlook. They can however see their organisations rooms in the address book (which is
    the intended outcome of using ABPs)
    If the user is part of the default GAL (no ABP) then all roomlists can be seen in room finder making me suspect that the problem is with the ABP
    I came across an article which is very similar to the problem that I am encountering however I am already using the suggested fix (using recipient filters) -
    Background to configuration
    We have a multi tenant exchange 2013 environment where each tenant is segmented from other tenants by the use of address book policies.
    Each tenant have been set-up using the following cmdlets:
    New-GlobalAddressList -Name "TenantName - GAL" -ConditionalCustomAttribute15 "ABC" -IncludedRecipients MailboxUsers -RecipientContainer "Path/to/OU
    New-AddressList -Name "TenantName - All Rooms" -RecipientFilter "(CustomAttribute15 -eq 'ABC') -and (RecipientDisplayType -eq 'ConferenceRoomMailbox')" -RecipientContainer "Path/to/OU
    New-AddressList -Name "TenantName - All Users" -RecipientFilter "(CustomAttribute15 -eq 'ABC') -and (ObjectClass -eq 'User')" -RecipientContainer "Path/to/OU
    New-AddressList -Name "TenantName - All Contacts" -RecipientFilter "(CustomAttribute15 -eq 'ABC) -and (ObjectClass -eq 'Contact')" -RecipientContainer "Path/to/OU
    New-AddressList -Name "TenantName - All Groups" -RecipientFilter "(CustomAttribute15 -eq 'ABC') -and (ObjectClass -eq 'Group')" -RecipientContainer "Path/to/OU
    New-OfflineAddressBook -Name "TenantName" -AddressLists "TenantName - GAL" 
    New-AddressBookPolicy -Name "TenantName" -AddressLists "TenantName - All Users", "TenantName - All Contacts", "TenantName - All Groups" -GlobalAddressList "TenantName - GAL" -OfflineAddressBook "TenantName"
    -RoomList "TenantName - All Rooms"
    As you can see each address list is populated by custom attribute 15 corresponding to the tenants code (of local significance) and the OU that the object resides in.
    N.B. I have rebuilt my outlook profile, switched to non-cached mode to no avail
    To reiterate, the ABP is working great apart from this room finder feature issue, each tenant can only see their rooms in their address book just not in the room finder.
    I have tried to build distribution group roomlists and set the custom attribute and OU to test but this didn't work as I'm aware you can only have address lists in the set-addressbookpolicy -roomlist cmdlet parameter, not distribution groups

    Hi Winnie,
    Apologies for not replying sooner, I've been busy over New Year!
    I have already seen/followed similar instructions to create roomlist's to no avail.
    The roomlist's created are all visible to a user when they are not apart of an ABP but when they are part of an ABP it shows no roomlists within room Finder.
    As initially mentioned, the tenants rooms can be seen in their address book just not in room finder!
    Here is the powershell results 
    PS] C:\Windows\system32>Get-DistributionGroup "Group: Test Room List"
    Name                          DisplayName                   GroupType                     PrimarySmtpAddress
    Group: Test Room list         Group: Test Room list         Universal                     [email protected]
    PS] C:\Windows\system32>Set-DistributionGroup "Group: Test Room List" -RoomList
    WARNING: The command completed successfully but no settings of 'cdc.com/Cdc/Group: Test Room list' have
    been modified.
    PS] C:\Windows\system32>Get-DistributionGroup "Group: Test Room List"
    Name                          DisplayName                   GroupType                     PrimarySmtpAddress
    Group: Test Room list         Group: Test Room list         Universal                     [email protected]
    PS] C:\Windows\system32>

  • ABP applied in OWA not in Outlook. Users see Default GAL and all address lists, regardless of address book policies.

    During a company merger a standard exchange org was converted to a multi-tenant setup. Problem: Address Book Policies not applied in Outlook, users see all address lists and default GAL. However, in OWA its all as expected, users see only what is allowed
    by the ABP.
    We followed the steps outlined in the MUlti-Tenancy and Hosting Guidance for Exchange Server 2010 SP2
    http://www.microsoft.com/en-us/download/details.aspx?id=28192
    It's EXCH 2010 SP3.
    Any idea would be appreciated.

    Hi,
    Please check whether the Default GAL changed in Outlook Online mode. The issue maybe occur when an Offline Address Book which is used for Outlook cached mode is not updated.
    Please run the following command:
    Get-OfflineAddressBook | Update-OfflineAddressBook
    In Outlook client, we can do the following steps in Outlook to download Offline Address Book to check whether the issue persists:
    1. Delete the *.oab files in the following folders in local machine:
         \Users\<username>\AppData\Local\Microsoft\Outlook\Offline Address Books
    2. Create a new Outlook profile that uses Cached Exchange Mode.
    3. Start Outlook 2010 with this new profile.
    4. In the ribbon click Send / Receive, click
    Send/Receive Groups and then click Download Address Book.
    Then check whether the Address Book is updated or not.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Address Book Policies

    We are running a test install of Exchange 2010 with two CAS servers and two mailbox servers.  One mailbox server has employee accounts and the other one has student accounts. The employee CAS and mailbox server have SP1 install.  The
    student CAS and mailbox server have SP3 installed.
    I have created two ABPs - one for employee and one for students.  When I log into a an account using the student OWA (SP3) I only see the addresses, etc that I am supposed to see.  When I log into an account using the employee OWA
    (SP1) I see all the address (both student and employee).
    When I log into Exchange using the Outlook client, I am able to see all the addresses\address books.  I upgraded the Outlook client from SP0 to SP1 to SP2.  I can still see all the addresses\address books.  The employee CAS and mailbox servers
    are still at SP1.
    Could the problem with ABP and the Outlook client be caused by the employee servers only have SP1 installed?

    Hi,
    From your description, I recommend you install the latest Service Pack 3 for your Exchange server 2010 and check the result. Exchange 2010 SP3 includes all fixes included in previous RUs and service packs.
    What's more, here is a helpful blog for your reference:
    Exchange Server 2010 SP3
    http://blogs.technet.com/b/exchange/archive/2013/02/12/released-exchange-server-2010-sp3.aspx
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • No e-mail address for contact on the same Exchange server in "From", when access is limited by address book policy

    Hello,
    I have following awkward situation:
    I have [email protected] and [email protected] on the same exchange server.
    Address book policies for this users are configured in such way, so contoso.com users do not see tailspintoys.com users at all (customer address list, based on OU - different domain users are in different OUs; custom globaladdressbooks, based on PrimarySmtpAddress
    filtering and custom Offline Address books, based on customized address list, mentioned earlier).
    [email protected] send an e-mail to [email protected] When [email protected] checks his inbox (in OWA) he sees new e-mail but when he checks "From" field - he sees only the name and even when checking (double-click) contact details everything
    is blank, no e-mail/phone/additional info.
    I want users to have access to e-mail, so this problem does not occur (it causes other problems with replies in Outlook 2011 for Mac), but still do not want contoso.com users see tailspintoys.com users in any address books (offline/GAB).
    Any suggestions?
    Thank you in advance!

    Hi Phillip,
    According to the description, I found that you want to hide information except sender's display name (?) to another domain. Please correct me if there is any misunderstanding.
    Based on my experience, it is impossible.
    Would you like to tell me the reason that why you want to hide additional information, maybe we can achieve this goal via other methods, like Outlook Rules or Transport Rules.
    I also notice this, 'it causes other problems with replies in Outlook 2011 for Mac' , if there is any problem on Outlook 2011 for Mac, I suggest creating a new thread on the Mac forum.
    For your convenience:
    http://answers.microsoft.com/en-us/mac/forum/macoutlook?tab=Threads
    Hope it is helpful
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Central Address Book

    I work in a small office (10 Employees) and we recently implemented an Xserve and switched all of our PC's to Macs (mix of MacBook Pro and 27"iMac). We would like to share one central address book but when we set up on user on the server (central) with all 2,500 contacts in it and then we install that user into our local machines address books it slows to a crawl and takes a very long time to search for a specific entry. Does anyone know a better way to share one address book amongst multiple machines on a network or is there a cheap software that we can use?

    Hi,
    Based on my research, the ABP is to provide a simpler mechanism to accomplish GAL segmentation for org that require multiple GALs.
    If you want to add external contacts, it seems impossible.
    Found an article related to ABP for your reference:
    Understanding Address Book Policies
    http://technet.microsoft.com/en-us/library/hh529948(v=exchg.141).aspx
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Cannot send email to Smart Group from Address Book

    I created several Smart Groups in Address Book but I can't use any of them to send email. When I right-click the group name and choose Send Email, it opens my default email program (Thunderbird) and puts only the name of the Smart Group into the To: field, not the actual addresses.
    If I try to actually send the message, I get the error that (name of group) "is not a valid e-mail address because it is not of the form user@host. You must correct it before sending the email."
    What am I doing wrong? How can I get it to paste the actual addresses and not just the name of the group? I looked at the Edit Distribution List window and all the addresses are there.
    I'm using OS X 10.5.7, Address Book 4.1.2 and Thunderbird 2.0.0.22.
    Thanks in advance.

    What is the exact message you get when sending fails -- does it say there are one or more invalid addresses, or what?
    Having a name in the list without email address or possibly one separated by comma between last and first might result similarly in an invalid address, and Mail will likely refuse to send to any. But if the message is from the SMTP, that might depend on the provider's policies for that.
    Ernie

  • LDAP support limited. How to configure Address Book / Directory Access?

    I complained to a sysadmin that my LDAP searches were returning very limited information (just surname and e-mail). He replied,
    "...[Address Book] can't be configured to query specific attributes, it can't be configured to show specific attributes except for the small set they have elected to permit, ... it doesn't even show cn/commonName which is a compulsory field in the inetOrgPerson schema or ou/organizationalUnitName which is the standard way of distinguishing components of an organization..."
    Directory Access seems to offer facilities for requesting specific attributes. I tried mapping them to Address Book fields, but with no improvement in the search results. Any tips?

    Here is some info I found on manually configuring and mapping schemas.
    Configuring LDAP Searches and Mappings
    Using Directory Access, you can edit the mappings, search bases, and search scopes that specify how Mac OS X finds specific data items in an LDAP directory. You can edit these settings separately for each LDAP directory configuration listed in Directory Access. Each LDAP directory configuration specifies how Mac OS X accesses data in an LDAPv3 or LDAPv2 directory.
    You can edit the mapping of each Mac OS X record type to one or more LDAP object classes.
    For each record type, you can also edit the mapping of Mac OS X data types, or attributes, to LDAP attributes.
    You can edit the LDAP search base and search scope that determine where Mac OS X looks for a particular Mac OS X record type in an LDAP directory.
    IMPORTANT: When mapping Mac OS X user attributes to a read/write LDAP directory domain (an LDAP domain that is not read-only), the LDAP attribute mapped to RealName must not be the same as the first attribute in a list of LDAP attributes mapped to RecordName. For example, the cn attribute must not be the first attribute mapped to RecordName if cn is also mapped to RealName.
    For detailed specifications of Mac OS X record types and attributes, refer to "Mac OS X Server Open Directory Administration for Version 10.4 or Later" (available at www.apple.com/server/documentation/).
    In Directory Access, click Services.
    If the lock icon is locked, click it and type the name and password of an administrator.
    Select LDAPv3 in the list of services, then click Configure.
    If the list of server configurations is hidden, click Show Options.
    Select a server configuration in the list, then click Edit.
    Click Search & Mappings.
    Select the mappings that you want to use as a starting point, if any.
    Click the "Access this LDAPv3 server using" pop-up menu and choose a mapping template to use its mappings as a starting point or choose Custom to begin with no predefined mappings.
    Add record types and change their search bases as needed.
    To add record types, click the Add button below the Record Types and Attributes list. In the sheet that appears, select Record Types, select one or more record types from the list, and then click OK.
    To change the search base and search scope of a record type, select it in the Record Types and Attributes List. Then edit the "Search base" field. Select "all subtrees" to set the search scope to include the entire LDAP directory's hierarchy from the search base down. Select "first level only" to set the search scope to include only the search base and one level below it in the LDAP directory's hierarchy.
    To remove a record type, select it in the Record Types and Attributes List and click Delete.
    To add a mapping for a record type, select the record type in the Record Types and Attributes List. Then click the Add button below "Map to __ items in list" and enter the name of an object class from the LDAP directory. To add another LDAP object class, you can press Return and enter the name of the object class. Specify whether to use all or any of the listed LDAP object classes by using the pop-up menu above the list.
    To change a mapping for a record type, select the record type in the Record Types and Attributes List. Then double-click the LDAP object class that you want to change in the "Map to __ items in list" and edit it. Specify whether to use all or any of the listed LDAP object classes by using the pop-up menu above the list.
    To remove a mapping for a record type, select the record type in the Record Types and Attributes List. Then click the LDAP object class that you want to remove from the "Map to __ items in list" and click the Delete button below "Map to __ items in list."
    Add attributes and change their mappings as needed.
    To add attributes to a record type, select the record type in the Record Types and Attributes List. Then click the Add button below the Record Types and Attributes list. In the sheet that appears, select Attribute Types, select one or more attribute types, and then click OK.
    To add a mapping for an attribute, select the attribute in the Record Types and Attributes List. Then click the Add button below "Map to __ items in list" and enter the name of an attribute from the LDAP directory. To add another LDAP attribute, you can press Return and enter the name of the attribute.
    To change a mapping for an attribute, select the attribute in the Record Types and Attributes List. Then double-click the item that you want to change in the "Map to __ items in list" and edit the item name.
    To remove a mapping for an attribute, select the attribute in the Record Types and Attributes List. Then click the item that you want to remove from the "Map to __ items in list" and click the Delete button below "Map to __ items in list."
    To change the order of attributes displayed in the list on the right, drag the attributes up or down in the list.
    Click Save Template if you want to save your mappings as a template.
    Templates saved in the default location are listed in pop-up menus of LDAP mapping templates the next time the current user opens Directory Access. The default location for saved templates is in the current user's home folder at this path:
    ~/Library/Application Support/Directory Access/LDAPv3/Templates
    Click Write to Server if you want to store the mappings in the LDAP directory so that it can supply them automatically to its clients.
    You must enter a search base to store the mappings, a distinguished name of an administrator (for example, uid=diradmin,cn=users,dc=ods,dc=example,dc=com), and a password. If you are writing mappings to an Open Directory LDAP server, the correct search base is "cn=config, suffix" (where suffix is the server's search base suffix, such as "dc=ods,dc=example,dc=com").
    The LDAP directory supplies its mappings to Mac OS X clients whose custom search policy includes a connection that's configured to get mappings from the LDAP server. The LDAP directory also supplies its mappings to all Mac OS X clients that have an automatic search policy. For instructions, see Configuring Access to an LDAP Directory and Setting Up Search Policies.

  • Can't Download Address Book in Office 2013

    When I try to "Download Offline Address Book List" I get  "! Task [my email address] reported error (0x80070057): 'Sorry, something went wrong. You may want to try again'"
    It's not just me, all of our users that have Outlook 2013 installed get the error.  If I recreate the profile then the latest copy of the address book is downloaded but no updates in the future are.  I've seen a few similar issues in the forums
    but none with answers that work.

    Did you install/upgrade Outlook 2013 based on the MSI file?
    Please try to locate the following registry key, take backup it and delete the following value.
    HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\15.0\Outlook\Cached Mode\
    Name: SpecifyOfflineAddressBookPath
    Type: REG_EXPAND_SZ
    Value:
    Or
    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Cached Mode
    Name: SpecifyOfflineAddressBookPath
    Type: REG_EXPAND_SZ
    You may also find a test machine and do fresh install Office 2013 to check if the error code would still pop-up.
    Feel free to post back.
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • Do mail merge with group from address book or other file?

    Is there a way to have Mail do a merge with a spreadsheet, a Filemaker file or the Address Book ( a group) so that every email looks personalized? Dear <name>,
    blah, blah, blah
    I need to send out an email to about 150 faculty and staff. Messages sent to a list often get ignored or deleted unread. I need these to be read.
    Thx
    G5 Dual 2.7 GHz   Mac OS X (10.4.7)  

    What is the exact message you get when sending fails -- does it say there are one or more invalid addresses, or what?
    Having a name in the list without email address or possibly one separated by comma between last and first might result similarly in an invalid address, and Mail will likely refuse to send to any. But if the message is from the SMTP, that might depend on the provider's policies for that.
    Ernie

  • Address book .... importing text file

    I am designing an address book which opens a text file called AddressBook.txt which reads in the information in the following format:
    lastname,firstname,street,city,state,zip,phonenumber,birthday,persontype
    lastname2,firstname2,street2,city2,state2,zip2,phonenumber2,birthday2,persontype2
    etc. (with a maximum entries of 500)
    I am having a problem reading in the information without the commas and wrapping to the next line. I can either use the BufferedReader or Scanner to input the file and as you can see below, my code is not complete yet. I can't figure out how to code the storeAddress() method in order to get the addressBookEntries[] to include the necessary information for outputting, sorting, etc. If I can get the information read into the addressBookEntries[], I think I will probably be able to proceed in the rest of the required tasks (i.e. sorting by last name, searching by last name, etc.)
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] =
            new AddressBookEntry[MAX_ADDRESS_ENTRIES];
        String FILE_NAME="AddressBook.txt";
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public void storeAddress(File addressFile){
         Scanner sc=null;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    try {
    // Delimiters specifiy where to parse tokens in a scanner
    sc = new Scanner(addressFile).useDelimiter("\\s*[\\p{,}*\\s+]\\s*");
    catch (FileNotFoundException fnfe) {
         JOptionPane.showMessageDialog(this,"Could not open the file");
    System.exit(-1);
    for(int i=0; i<MAX_ADDRESS_ENTRIES; i++){
         while (sc.hasNext()) {
    lname=(sc.next());
         if (!lname.equals("")){
         addressBookEntries[i].setLName()=lname;
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private Date bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public String toString() {
    return lastName+" "+firstName;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public Date getBday(){
    return bday;
    public void setBday(Date newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public class extPerson extends Person{
    //new clss People
    public class People {
         int MAX_PEOPLE=500;
         BufferedReader bf;
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group[i]+"\n");
              return sb.toString();
    public void read(){
              String str;
              try {
              bf=new BufferedReader(new FileReader(new File(FILE_NAME)));
              str=bf.readLine();
              while (str!=null) {
              insert(str);
                   str=bf.readLine();
         catch (IOException e) {
              // Will jump to here on an eof condition.
         try {
              bf.close();
         catch (IOException e) {}
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public People() {
              group=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              //extPerson guy=new extPerson(data);
              //group[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
         public void clear() {
              // This loop frees up the memory used by each extPerson
              for (int i=0; i<nPeople; i++)
              group[i]=null;
              nPeople=0;
    extPerson group[];
    int nPeople;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    Ok, I have changed my code to reflect your suggested changes, but I'm still unsure how to use the findInLine you suggested.... This is all very new to me and I've been looking on the java website for suggestions, but I'm still stumped on how to pull this together. I'm unsure on how to set the lastname,firstname,etc. for retrieval...
    Here's my code:
    //ADDRESS BOOK
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    *  @created September 14, 2004
    *  This program uses a JFrame to manipulate data and form an
    *  address book.  The user will be able to load data from a file,
    *  sort it by last name, print the address, phone number, and date
    *  of birth, print the names of people whos birthday are between 2
    *  dates, print the names of people between 2 last names, and/or
    *  print the names of different person types.
    public class AddressBook extends JPanel implements ActionListener{
        JFrame frame;
        final int numButtons = 7;
        JRadioButton[] radioButtons = new JRadioButton[numButtons];
        JButton process = new JButton("Process Request");
        JLabel title;
        JTextArea output = new JTextArea(30,50);
        int MAX_ADDRESS_ENTRIES = 500;
        AddressBookEntry addressBookEntries[] = new
        AddressBookEntry[MAX_ADDRESS_ENTRIES];
        public AddressBook(JFrame frame){
            super(new BorderLayout());
            this.frame=frame;
            JPanel choicePanel = createSimpleDialogBox();
            choicePanel.setBorder(BorderFactory.createTitledBorder("Choices" +
            " to choose from:"));
            title = new JLabel("<html><h2> Thank you for opening the " +
            "Address Book.  " +
            "Please Press the \"Process Request\" " +
            "after making a choice.</h2></html>\n",JLabel.CENTER);
            title.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
            output.setEditable(false);
            add(title, BorderLayout.NORTH);
            add(choicePanel, BorderLayout.CENTER);
            add(output, BorderLayout.SOUTH);
            final ButtonGroup group = new ButtonGroup();
            final String saveCommand = "Save";
            final String sortByLN = "Sort by Last Name";
            final String searchLNCommand = "Search By Last Name";
            final String printAPD = "Print address, phone number, and DOB";
            final String printNamesDOB = "Print names of people whose birthday" +
            " falls between 2 dates";
            final String printNamesLN = "Print names of people who fall" +
            " between 2 last names";
            final String printPType = "Print all family members, friends, or" +
            " business associates";
        private JPanel createSimpleDialogBox(){
            radioButtons[0] = new JRadioButton(
              "<html>Save the address file</html>");
            radioButtons[0].setActionCommand(saveCommand);
            radioButtons[1] = new JRadioButton(
              "<html>Sort the address file by last name</html>");
            radioButtons[1].setActionCommand(sortByLN);
            radioButtons[2] = new JRadioButton(
              "<html>Search the address file by last name</html>");
            radioButtons[2].setActionCommand(searchLNCommand);
            radioButtons[3] = new JRadioButton(
              "<html>Print the address, phone number, and DOB of a specified" +
              " person</html>");
            radioButtons[3].setActionCommand(printAPD);
            radioButtons[4] = new JRadioButton(
              "<html>Print the names of people whose birthday falls between" +
              " two dates</html>");
            radioButtons[4].setActionCommand(printNamesDOB);
            radioButtons[5] = new JRadioButton(
              "<html>Print the names of people who fall between two" +
              " specified last names</html>");
            radioButtons[5].setActionCommand(printNamesLN);
            radioButtons[6] = new JRadioButton(
              "<html>Print all family members, friends, <u>OR</u>" +
              " business associates</html>");
            radioButtons[6].setActionCommand(printPType);
            for (int i=0; i<numButtons; i++){
                group.add(radioButtons);
    //set the first button (open file) to be selected
    radioButtons[0].setSelected(true);
    return createPane(radioButtons, process);
    private JPanel createPane(JRadioButton[] radioButtons,
    JButton showButton) {
    int numChoices = radioButtons.length;
    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    for (int i = 0; i < numChoices; i++) {
    box.add(radioButtons[i]);
    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.NORTH);
    pane.add(showButton, BorderLayout.SOUTH);
    return pane;
    public void actionPerformed(ActionEvent e) {
    String command = group.getSelection().getActionCommand();
    //else if button pushed is save
    if (command == saveCommand){
    // save file
    //else if button pushed is search by last name
    else if (command == sortByLN){
    // search by last name
    //else if button pushed is sort by last name
    else if (command == searchLNCommand){
    // sort by last name
    // print to screen
    //else if button pushed is display address, ph#, dob
    else if (command == printAPD){
    // display "search by last name" dialog
    // search last names
    // if last name found
    // print data
    // else
    // print error notification "person not found"
    //else if button pushed is list names of people whose
    //bday between 2 days
    else if (command == printNamesDOB){
    // ask for which dates
    // search bday
    // print to screen
    //else if button pushed is print names of people between 2 last names
    else if (command == printNamesDOB){
    // ask for which two last names
    // search last names
    // if people found
    // print to screen
    //else
    //print error notification "no one found"
    //else if button pushed is print all family members, friends
    //or business associates
    else if (command == printPType){
    //ask for what person type
    //search person types
    //if people found
    //print to screen
    //else print "no one found"
    public class AddressBookEntry{
    private extPerson address;
    private String date;
    private extPerson ExtPerson;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    public static void createAndShowGUI(){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Address Book Program");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    c.add(new AddressBook(frame));
    frame.pack();
    frame.setVisible(true);
    public static void main (String s[]){       
    //Schedule a job for the event-dispatching thread:
    //creating and showign this application's GUI
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    //PERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    public class Person{
    protected String lastName, firstName;
    private String address;
    private String city;
    private String state;
    private String zipcode;
    private String homephone;
    private String extPersonType;
    private String bday;
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-DD");
    public void parseString(String s) {
              try {
              lastName = s.substring(0,s.indexOf(","));
              firstName = s.substring(s.indexOf(",")+1);
    address = s.substring(s.indexOf(",")+2);
    city = s.substring(s.indexOf(",")+3);
    state = s.substring(s.indexOf(",")+4);
    zipcode = s.substring(s.indexOf(",")+5);
    homephone = s.substring(s.indexOf(",")+6);
    extPersonType = s.substring(s.indexOf(",")+7);
    bday = s.substring(s.indexOf(",")+8);
    catch(StringIndexOutOfBoundsException sbe) {
              JOptionPane.showMessageDialog(null,"Error " +
    "in Person: Could not parse the line "+s);
    public String toString() {
    return lastName+","+firstName+","+address+","+city+","+
    state+","+zipcode+","+homephone+","+bday+","+extPersonType;
    public void setLName(String last) {
    lastName=last;
    public void setFName(String first){
    firstName=first;
    public String getLastName() {
    return lastName;
    public String getFirstName() {
    return lastName;
    public Person() {
    lastName="";
    firstName="";
    public Person(String first, String last){
    setLName(last);
    setFName(first);
    //Set the address and return it
    public void setAddress( String addr ){
    address = addr;
    public String getAddress(){
    return address;
    //set the city and return it
    public void setCity( String town ){
    city = town;
    public String getCity(){
    return city;
    //set the state and return it
    public void setState( String st )
    state = st;
    public String getState()
    return state;
    //Set the zip code and return it
    public void setZipCode( String zip ){
    zipcode = zip;
    public String getZipCode(){
    return zipcode;
    //Set the home phone and return it
    public void setHomePhone( String homeph ){
    homephone = homeph;
    public String getHomePhone(){
    return homephone;
    //Set the bday and return it
    public String getBday(){
    return bday;
    public void setBday(String newBday) {
    bday = newBday;
    dateFormat.format(bday);
    //Set the extPerson type and return it
    public String getPType(){
    return extPersonType;
    public void setPBusiness(){
    extPersonType = "Business Associate";
    public void setPFamily(){
    extPersonType = "Family Member";
    public void setPFriend(){
    extPersonType = "Friend";
    public Person(String data) {
    parseString(data);
    //EXTPERSON
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import java.io.*;
    import java.lang.*;
    //new clss extPerson
    public class extPerson extends Person {       
         int MAX_PEOPLE=500;
         BufferedReader bf;
    String lname,fname,street,city,state,zip,phone,persontype,bday;
    String FILE_NAME="AddressBook.txt";
    public String toString() {
              StringBuffer sb=new StringBuffer();
              for (int i=0; i<nPeople; i++)
              sb=sb.append(group1[i]+"\n");
              return sb.toString();
         public void save() {
              try {
              PrintWriter pw=new PrintWriter(FILE_NAME);
              for (int i=0; i<nPeople; i++)
              pw.println(group1[i]+",");
              pw.close();
         catch (FileNotFoundException fne) {
                   System.out.println("Could not Save "+FILE_NAME);
    public extPerson() {
              group1=new extPerson[MAX_PEOPLE];
              nPeople=0;
         public boolean insert(String data) {
              if (nPeople<MAX_PEOPLE) {
              Person guy = new Person(data);
              group1[nPeople]=guy;
              nPeople++;
              return true;
         else {
         JOptionPane.showMessageDialog(null,"Error in People" +
    "::insert: Max size reached.");
         return false;
    Person group1[];
    int nPeople;

  • Can different family member accounts share an address book in iCloud?

    we have a primary mobileme account which is now set up in icloud.  we have a family pack with a secondary family member account set up for my wife's business email.  This secondary account now also has its own icloud account that we set up.  Works fine.  The question is this - when my wife is logged in to her icloud secondary account and looking at her work-related emails, how can she access the addresses in the address book that is linked to the main icloud account?  She is usually working from a PC so it's not a matter of just looking at the local copy of the address book.  She needs to log out of the secondary icloud account, log in to the primary, look up the address, and then go back to the secondary account to send the email from her work email address.  Too cumbersome.  And icloud does not seem to like having two instances of icloud running at the same time on the same computer.
    Any thoughts would be appreciated.
    Thanks -
    Joel

    You're welcome.
    Happy Holidays to you and your family.
    Please note the items listed under Legend in the right sidebar of this page.

  • How can I add an e-mail address to my address book from an e-mail?

    Someone sends me an e-mail and I do not have their e-mail in my Thunderbird address book. Is there a way to enter their information into my address book without having to retype it all into my address book. In other e-mail programs that I have used, all I needed to do was click on the message and then click on a drop-down menu item that would simply copy all of the contact information into a new address book entry. Is it possible to do that in Thunderbird?

    When viewing a message in a tab or the message pane there is a star to the right of the senders address. If the star is filled with color the address is already in one of your address books. If the star is not filled, click the star to add them. Click the star a second time to open the edit dialog box to add more details to the contact.
    This is not the same star that is to the left of the message header when viewing the inbox.

  • Is there a way of persuading iCloud to sync the smart groups I have in address book on my Mac

    I have a small number of smart groups in address book on my iMac. but these do not sync through iCloud to my Macbook or iPod touch.  Everythin else syncs even ordinary groups, but not the smart groups.  Is there a way of persuading iCloud to do it?  I can fully sync my Macbook contacts by exporting an archive from the iMac and then comying and importing this to the Macbook.  But this is old technology.

    longfellow39 wrote:
    .......Is there a way of persuading iCloud to do it? ........
    Unfortunately not.

  • Some of the entries in my address book show birthdays one day/year earlier in Ical. I cannot change this except by putting in the birthdays a day/year earlier than they are. Why is this happening only for some entiries and not others?

    Some of the birthdays I have entered in Address book appear in my Ical one day and one year earlier than the date I have given. Eg. I have entered a birthday in Address book as 23 March 2011 and it appears in Ical as being on 22 March 2010. Other names have no problems. There are only some that do not appear with the correct date and year. Why is this?  Has anyone found how to correct this strange problem?  I have Time Zones ticked.
    Bronze2011

    I'm having this exact same problem, but it's doing it with a bunch of birthdays. I also did 0001 when I didn't know the birth year, so I went back and did a more current year, but they still aren't showing up where they should be...or at all. It's completely bizarre.

Maybe you are looking for