Resolved How can I create a new member/contact in a certain group in Outlook using Applescript

Discussion in 'Mac Apps and Mac App Store' started by Rabb, May 26, 2015.

  1. Rabb, May 26, 2015
    Last edited: May 27, 2015

    Rabb macrumors newbie

    Joined:
    May 26, 2015
    #1
    Hi,

    In Outlook 2011, I would like to add a new member/contact in a certain group by using Applescript.

    The code below works in entourage but not in Outlook 2011:


    Code:
    
    
    make new contact at group "MyGroup" with properties {«class emad»:{«class radd»:"the Email Address", name:"the Name"}}
    
    
    
    Any idea, how can I add a new member/contact in a certain group using Applescript?

    thx in adv.
     
  2. 0d085d macrumors regular

    Joined:
    Apr 23, 2015
    #2
  3. 0d085d macrumors regular

    Joined:
    Apr 23, 2015
    #3
    Whoops, no, sorry, that's not quite what you wanted.
     
  4. Rabb thread starter macrumors newbie

    Joined:
    May 26, 2015
    #4
    Dear 0d085d,

    thank you for your reply.

    But the code does not add a new contact to a certain group!


    I would like to add a new entry in a certain group by using Applescript.

    The contacts/Members of a group has only the properties name and address.

    The code below works in entourage but not in Outlook 2011:
    Code:
    
    
    make new contact at group "MyGroup" with properties {«class emad»:{«class radd»:"the Email Address", name:"the Name"}}
    
    
    
    
    

    Any idea, how can I add a new member/contact in a certain group using Applescript?

    thx in adv.
     
  5. 0d085d macrumors regular

    Joined:
    Apr 23, 2015
    #5
    How's this?

    Code:
    tell application "Microsoft Outlook"
    	set theGroup to group "MyGroup"
    	set newAddress to {type:public group address, address:"test2@test.com", name:"Test2"}
    	set (members of theGroup) to (members of theGroup) & {newAddress}
    end tell
     
  6. Rabb thread starter macrumors newbie

    Joined:
    May 26, 2015
    #6
    Dear 0d085d,

    thank you for your solution.

    Your code works very well!

    This thread is resolved.
     
  7. david91 macrumors regular

    Joined:
    Apr 15, 2015

Share This Page