Applescript & Outlook; make new contact

Hi all,
I'm working on an Applescript that will allow me to create a new contact in Outlook.
This is what I have thus far based on some old Entourage code and the Applescript Outlook dictionary:
  tell application "Microsoft Outlook"
  activate
  make new contact with properties {display name:displayName, home street address:theAddress, home city:city, home state:theState, home zip:zip, phone:thePhone}
  quit
  end tell
Alas, it fails and tosses back an Event handler error.
Any thoughts?
-Julian

Try this --
set FirstName to "Barack"
set LastName to "Obama"
set theAddress to "1600 Pennsylvania Avenue NW"
set city to "Washington"
set theState to "DC"
set zip to "20500"
set thephone to "(202) 456-1111"
set jobtitle to "President of the United States"
tell application "Microsoft Outlook"
activate
          set mycontact to make new contact
open mycontact
          tell mycontact
                    set properties of mycontact to {first name:FirstName, last name:LastName, home street address:theAddress, home city:city, job title:jobtitle, home state:theState, home zip:zip, phone:thephone, email addresses:{{address:"**** --> (my guess)", type:work}}}
          end tell
end tell
I changed the name property from display name to first name last name. As default, what is display name uses first/last. To get other contact properties I asked a script to get the properties of a contact. That is how I got the email address part.
<Email Edited By Host>

Similar Messages

  • I have a question, I've always used my moms old email for my Apple ID because I got my first apple product when I was a little kid and I didn't have an email so if I change it will people have to make new contacts of me on their devices?

    I have a question I've always used my moms old email for my Apple ID but when I text on iMessage it says my moms email is the one who sent the message and it's embarrassing so if I change my Apple ID email will my friends have to make new contacts of me on their devices? please answer this as soon as possible I beg you.

    If you get your own Apple ID, then you will need a new email address unless you have an email address that is different from your mom's. In that case you use your own email address as your Apple ID.
    You will have to reconfigure everything to associate them with your new Apple ID. This also means any apps or music you  purchased using your mom's Apple ID will have to be repurchased using your Apple ID.
    iTunes- How to set up an Apple ID within iTunes
    Apple IDs and iCloud
    Frequently asked questions about Apple ID

  • AppleScript Error in Creating a New Contact (Help)

    I wrote this script w/ variable but I am getting an error on the make contact part of the script. What am I missing?
    --User Inputs to get Client details
    display dialog "Enter a Name, please:
    Please enter Contact's First Name:" default answer "First Name"
    set ClientName to text returned of result
    display dialog "Please Enter Contact's Last Name:
    Please enter Contact's Last Name:" default answer "Last Name"
    set LastClientName to text returned of result
    display dialog "Please enter Contact's email address:
    Please enter Contact's Email:" default answer "[email protected]"
    set lastemail to text returned of result
    --Add to Outlook
    tell application "Contacts"
      activate
      make new card with properties {first name:ClientName, last name:LastClientName, email:lastemail}
      quit
    end tell

    I now have this and it is working except on Running it I get a Result: Missing value but it works.
    make new email at end of every email of person id "0F4D2342-BD28-4D75-8F20-0EFF4B280A69:ABPerson" with properties {label:"Work", value:"[email protected]"}
    --> email 1 of person id "0F4D2342-BD28-4D75-8F20-0EFF4B280A69:ABPerson"
    save current application
    --> missing value
    end tell
    Result:
    missing value
    Here is new script.
    --User Inputs to get Client details
    display dialog "Enter a Name, please:
    Please enter Contact's First Name:" default answer "First Name"
    set ClientName to text returned of result
    display dialog "Please Enter Contact's Last Name:
    Please enter Contact's Last Name:" default answer "Last Name"
    set LastClientName to text returned of result
    display dialog "Please enter Contact's email address:
    Please enter Contact's Email:" default answer "[email protected]"
    set lastemail to text returned of result
    --Add to Address Book
    tell application "Contacts"
        set thePerson to make new person with properties {first name:ClientName, last name:LastClientName}
        tell thePerson
            make new email at end of emails of thePerson with properties {label:"Work", value:lastemail}
        end tell
        save
    end tell

  • In e-mail how do I make a contact and can i import my contacts from my old pc to my new imac

    How do I make a contact in the e-mail program and can I import my e-mail contact list into my new iMac e-mail

    If by, "the e-mail program," you mean, Apple's "Mail" application, you make contacts by inputting them into the "Address Book" application. It's a separate application.
    Since I have no idea what you mean by, "my e-mail contact list," I can't recommend a method for transferring contacts to your "Address Book."
    You need to provide more information to get the answers that you need.
    What's the name of the e-mail program that you want to use, i.e., Mail, Outlook, Entourage?
    "New iMac e-mail," is not specific.
    What's the name of the e-mail program that you were using on your PC, i.e., Outlook, Outlook Express, etc.?

  • How to add custom label to a new contact in address book which is synced with outlook account

    Hello all,
    My iPhone is synced with outlook account. When I tried to create a new contact,'Add Custom Label' option was missing. Is Apple provides any solution to handle this? Is there any documentation provided about this behavior?

    The second script is working but if I need to change the link it will not allow me to edit or delete it in iCal on my desktop. The only way to edit it is to use the online iCal in me.com.
    And the worst problem is that the url does not show up on my iPhone iCal. The iPhone version of iCal has limited features. So if I'm away from the office on my iPhone I still have the problem of having no link to my iCal appointment. I still end up having to use both iCal and Contacts as separate Apps.
    I still dont understand why Apple wouldnt make these 2 Apps work together! It seems so obvious! thanks anyway.

  • New 3GS hangs when syncing Outlook calendars and contacts

    My new 3GS hangs when syncing Outlook calendars and contacts on my PC running XP. I've read a bunch of previous similar posts but haven't seen a solution. Does anyone have any hints? Thanks in advance

    This is a rare problem these days; it was common with earlier versions of the firmware. It is usually caused by a corrupted database in Outlook. Open contacts in Outlook and check the first few entries. Open each, make a change, and save it. If you get an error saving it you should either delete it, or export the entire address book from within Outlook, then reimport it. One of these will fix the problem if it is a corrupt entry.

  • New Contacts on the Phone, and problem syncing with Outlook.

    I have an iPhone4 with the iOS5 software.  I recently did a sync with my phone (regular sync using iTunes and not iCloud).  I had added some new contacts to my phone, but after the sync was complete, the contact was removed from my phone.  I assume because it was not added to my Outlook contacts first.  Is there a setting in iTunes that will add contacts that are only on my phone to my Outlook contacts?  I don't want to have to keep adding all my contacts in two places just so I have them as a backup.

    Hi and Welcome to the forums..
    Have you tried a 'One way Sync' coming from the device to the computer only?
    If your issue is resolved, put a checkmark in the green box that contains the resolution.
    OR
    If it was just/or also really helpful - Give it a Kudos.. Go on Mate.. Help the rest of the clueless blackberry user world find their answer too..
    ~Gday from Down Under~

  • How to make new project in existing folder with applescript in Aperture?

    I want to create a new project in an existing folder. I've scoured the web for answers to this but I cant find any. The closest I've come is this:
    tell application "Aperture"
    set imgSel to (get selection)
    if imgSel is {} then
    error "Please select an image."
    else
    set pName to name of parent of item 1 of imgSel
    set pID to id of parent of item 1 of imgSel
    set cID to id of parent of parent of item 1 of imgSel
    set cName to name of parent of parent of item 1 of imgSel
    set cLoc to folder cName
    tell library "Aperture Library"
    make new project at cLoc with properties {name:pName}
    repeat with i from 1 to count of imgSel
    move item i of imgSel to project (pName)
    end repeat
    end tell
    end if
    cLoc
    end tell
    Which returns:
    error "Aperture got an error: AppleEvent handler failed." number -10000
    Can anyone enlighten me as to what I'm doing wrong here or show me another way to achieve my goal, thanks?

    when you say 'new project in an existing folder'..... I assume you mean to create a new Project inside of an existing "Blue" folder...?
    Easy.... Select (click) the Blue folder you wish a new Project to appear inside > At the top left corner where it says "new" click the drop down arrow and select the project icon and click it.
    Easier still > select the Blue folder you wish another Project to appear inside > use 'Command & N' on the keypad and away you go...
    If you dont mean the above...? and you want a blue folder inside a blue folder..?
    To create a new blue folder use either the 'New' icon again at the top of the library inspector and click the blue folder icon or (Shift & Command & N ) on the keypad. Then select the new blue folder and repeat the process again...... A folder inside a folder..
    Couldn't be simpler....
    Aperture already provides these simple commands.... I cant imagine why you want to write an 'Applescript Action' for it.... Unless just for the heck of it...??
    Regards..... Gerry...

  • New contacts are syncing between Outlook and iPhone but existing contact on iPhone are not showing up in Outlook, how do I get them into Outlook?

    New contacts are syncing between Outlook and iPhone but existing contacts on iPhone are not showing up in Outlook.  How do I get them to sync and into Outlook?

    Allan: This worked for this issue -- Thanks!
    https://discussions.apple.com/message/21353115#21353115

  • HT4759 every time save a new contact dont Shows in Outlook 2007

    every time save a new contact dont Shows in Outlook 2007

    Hi,
    You need to go ahead and complete it. 
    Before you can enter a phone number for a contact, you need to enter your telephone area code and save it . This way Outlook will know how to format your phone numbers.
    You can configure this in Control Panel > Phone and modem.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Since I upgraded to iOS 7.1.2, new Outlook calendar and contact items will not sync to/from my iOS devices - I am not using the iCloud, just sync'ing direct to/from laptop. Does anyone have a solution?

    Since I upgraded to iOS 7.1.2, new Outlook calendar and contact items will not sync to/from my iOS devices - I am not using the iCloud, just sync'ing direct to/from laptop. Neither direction seems to be working.
    Does anyone have a solution?

    Hello Happy-in-the-Mountains,
    Thanks for using Apple Support Communities.
    To troubleshoot this issue where you're unable to sync between your iPhone and Outlook, I'd like you to please follow the steps in the article linked to below.
    Troubleshooting Sync Services on Windows with Microsoft Outlook 2003, Outlook 2007, or Outlook 2010 - Apple Support
    Have a great weekend,
    Alex H.

  • I have installed CS5 on my new computer and cannot make a contact sheet

    I have installed CS5 on my new computer and cannot make a contact sheet. I have used CS5 for a number of years making contact sheets of my daily shoots, but now when I go to file, automate there is no 'contact sheet' selection.  Would you please answer me at [email protected]

    Not sure how far you've gotten, so i'll start from the beginning.
    After you downloaded the PSCS5OptionalPlugins_Win_en_US.zip
    right click on it and choose Extract All
    In the Extract dialog check Show extracted files when complete
    Then the window should open showing a folder as below
    If you double click on that folder, then there is a pdf with instructions for installing the plugins
    If you still need help with installing we can assist you

  • How to save new contact from phone app to ms outlook work account instead of local contact

    Hi,
    I need some help please.
    I usually save new numbers that call me from the phone app, I just hit "add to contacts".
    I keep all of my contacts on my work microsoft outlook account so they are synced with my work, I have absolutely no local contacts on the phone.
    My Z10 saves these contacts directly as local contacts instead of saving them on my work account.
    However, if I go to the phonebook app, and select add new contact from there, I have the option to select whether it's a personal or a work contact. If I select work contact, it will save it to my work outlook and everything's fine, however when saving from the phone app I don't have this option.
    I don't understand what I'm doing, wrong, please help on how to save to work account directly from phone app.
    Thank you
    Solved!
    Go to Solution.

    Hey bllizzard,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    What version of BlackBerry 10 software are you currently using?  Go to Settings>About to find this information.
    When in the phone application and press and hold a number, choose add to contacts.  Then click Add contact at the bottom, at the very top you'll have a choice to choose Personal or Work.  Choose Work if you want the contact saved to your work email account.
    Let me know if you have any more questions.
    Cheers.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Cannot Sync my new contacts from I phone 4s to outlook but can sync a new contact from outlook 2010 to iphone. I could earlier sync both ways

    Cannot Sync my new contacts from I phone 4s to outlook but can sync a new contact from outlook 2010 to iphone.
    I could earlier sync both ways
    what could the problem be

    If your iMac is running 10.9, with contacts and calednar, Maverick is designed to sync those through the icloud
    http://support.apple.com/kb/PH12117
    " If you use OS X Mavericks v.10.9 or later, your contacts, calendars, and other info are updated on your computers and iOS devices via iCloud."

  • IPhone 6plus sync to Outlook 2010 by USB cord but won't sync new contacts or calendar items

    I just upgraded to an IPhone 6 and use Outlook 2010 (not in the Cloud).  plugged the phone into the computer using USB cord, synced everything over but there isn't any transfer of new contact or calendar items between the two. 
    I've tried resetting the sync history, replacing the phone info with the computer info, double checking the different calendars that are associated but nothing seems to work.  Any suggestions?

    Hi,
    You are trying to sync iPhone and Outlook 2010 with iTunes for Windows via USB, right?
    Seems you've tried the most common solutions (reset Sync history and replace information on iPhone) for this kind of issue, but to no avail. To continue to troubleshoot the issue, I would suggest we first try following steps:
    Disable third-party Outlook add-ins. Outlook third-party add-ins sometimes might interfere with the communication between iTunes and Outlook. Go to
    File>Options>Add-Ins>click
    COM Add-ins in the Manage list>Click
    Go, in the dialog, deselect the checkbox for each third-party add-in in the list.
    Try to sync with a new Windows user. A corrupted Windows user profile sometimes will cause this issue.
    Please note that Outlook synchronization support for iPhone, iPod touch, and iTunes is provided by Apple support. If issue persists, I would suggest you to contact Apple support for further assistance.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for

  • Hard drive crashed, saved programs on external hard drive, reinstalling and having issues getting programs to work. What should I do?

    I have a Mac and purchased a student edition of CS6 before you had to subscribe. My hard drive crashed and I was able to reinstall the programs, but there is an error. Does anyone know how to contact support or how to fix the problem?

  • Scanning conflict   Acrobat 9 pro   "Color Format Selected Not Supported"

    I have had several conflicts with Adobe Acrobat 9 and my HP C5180 printer/scanner/copier.   I have downloaded new drivers from HP.   When I try to create  a PDF from the scanner,  I get this conflict warning:   "Color Format Selected Not supported". 

  • ABAP Function Module table into crystal

    Hello, I created a ABAP Function Module with one export parameter(a structure), and another table paramemter(with table type of identical to a table in sap). I wrote a simple select statement and dumped the data into the internal table which I am pas

  • Metadata question

    The metadata has a set of data titled IPTC Status. The first field in this data block is Title. The title reflects the title entered in Lightroom's (Library) Metadata panel. This information can also be entered or changed using the Sync feature to sy

  • Windows 8.1 and ipv6 device stack issues

    Hello, so here is the thing: ZTE Integrated access device (gateway) connected to the ONT. It has ipv6 support which ISP still doesn't use and there is no way of disabling it in router even though I've obtained ISP's admin account. So many ipv6 option