Applescript cannot reference Outlook 2011 Contact Email Address

Hi All,
Hair all pulled out; about to kick my head against a real brick wall.  I have an applescript that had worked great in Entourage but Outlook has changed the dictionary. Trying to tweak it, but it's painful.
Basically, I'm trying to add email addresses to a contact object. In entourage, I used this:
set addx to (make new email address with properties {type:home, contents:(item i of emailAddresses)} at theContact)
And it worked great (obviously, I declare theContact earlier and do stuff with it later)
Accordng to the dictionary, in Outlook it seems the list of contact email addresses are in a property called "Email Addresses" which contains a list of "Contact Email Address" items.
Any attempt to reference, declare, make new, ANYTHING with contact emaill addres fails with an error.  As an example (emailAddresses is my own list of text items)
This command: set addx to make new contact email address with properties {type:work, address:(item i of emailAddresses)}
Returns this: Microsoft Outlook got an error: Can’t make class contact email address.
This one: set end of email addresses of theContact to (contact email address with properties {type:work, address:(item i of emailAddresses)}
won't even compile, and returns: A properties:true can’t go after this contact email address.
So I'm not sure how to add an address if I can't declare one.
If anyone has successfully added an email to a contact record via applescript, I'd LOVE to see how you did it!
Thanks,
Jeff

I don't have Outlook, so can't be sure here, but there are common AppleScript parallels that might help.
This command: set addx to make new contact email address with properties {type:work,address:(item i of emailAddresses)}
Returns this: Microsoft Outlook got an error: Can’t make class contact email address.
Typically you cannot arbitrarily make a new object without defining where.
I would suspect this code would work better as:
set addx to make new contact email address at end of email addresses of theContact with properties {type:work,address:(item i of emailAddresses)}
By telling AppleScript where to create the object you should be OK
Just a guess, though.

Similar Messages

  • When I sync my iPhone 5 to Outlook 2010, the email addresses that I have listed as Email 1 for any given contact in my iPhone will be automatically moved to Email 3 in the Outlook file. Is there a way to fix this?

    When I sync my iPhone 5 to Outlook 2010, the email addresses that I have listed as Email 1 for any given contact in my iPhone will be automatically moved to Email 3 in the Outlook file. Is there a way to fix this?

    iCloud email supports 'plus' addressing. http://en.wikipedia.org/wiki/Email_address#Address_tags
    So your friend could just add '+research' to the username part of your email address, and you setup a rule at icloud.com to put all emails sent to that address into a particular folder.
    For example:
    [email protected]
    There's no way to do it without rules on the server though.

  • Cannot access 2 of 3 email address lists. Why?

    This just occurred. The same address list comes up with all 3 email addresses I have . Even when I exit & turn off my computer & go back to email I still cannot get to my 2 other address lists. For example: When in email 1, or 2, , email 3's address is shown. I email 3 it is okay. Also, I have to use tools to get the address list and it fills the screen - so I cannot click to get the address onto my email address line because my email is covered by the address screen. Frustrating.
    Previously I could go to "contacts" which is now gone, and click. The address list would come up & I could drag the address to my email. Now I cannot do that.
    So I cannot access 2 of 3 email address lists, cannot click on an address to put on my email to send. So how do I fix this.? I have 100's of email addresses I access. I am NOT a computer wiz so please help and if you can, please make it simple as you can!
    Thanks, Gail

    are you talking about the contacts sidebar that toggles on and off with the F9 key?

  • I have recently bought a macbook and am using outlook 2011 as email. i am getting an error message 4.7.0 not allowed when sending emails how do I fix?

    i have a macbook and am using outlook 2011 as email.   receiving okay.   sending okay sometimes.  am now getting error message 4.7.0 not allowed when sending.  what is the cause? how do I fix please?

    I have discovered that the emails have in fact been sent but much later, maybe it's a network problem with the people i am sending it to.  so i checked my sent items and they are there, but at the time the email doesn't go straight into the sent box or drafts so i'm assuming it's disappeared and type it again.  i'll keep going with it, until someone can give me a possible solution or explanation as to what is happening.

  • How do I add a contacts email address

    How Di I add contacts email addresses ?

    If you insist on using a mailing list for something it is not designed for I guess the answer is yes.
    Address books are for contacts and provide for contacts without email addresses. As stated earlier, mailing lists are for creating groups for sending group emails. In order for a contact to be on a mailing list they have to exist in the address book you are creating the list in.
    A better solution if you are trying to create categories of contacts is create a new address book.

  • HT1386 What is the procedure to sync Outlook 2011 Contacts, Calendars, Notes, and Tasks to my iPhone4S using OS X Version 10.8.3?

    What is the procedure to sync Outlook 2011 Contacts, Calendars, Notes, and Tasks to my iPhone4S using OS X Version 10.8.3?

    Ideally your iPhone and Outlook would be setup to use an Exchange account

  • What is the procedure to sync Outlook 2011 Contacts, Calendars, Notes, and Tasks to my iPhone4S using OS X Version 10.8.3?

    What is the procedure to sync Outlook 2011 Contacts, Calendars, Notes, and Tasks to my iPhone4S using OS X Version 10.8.3?

    When the phone is connected to the computer in iTunes, go to the Info tab and select Outlook as the source for Contacts and Calendars. Tasks will not sync, but Notes can be selected to sync as well.

  • How could I synchronize iCloud with Outlook 2011 CONTACTS?

    How could I synchronize iCloud with Outlook 2011 CONTACTS?

    Since this is a MacBook Pro Hardware forum, you would get a better answer in the iCloud forum. 

  • IPad cannot backup without a verified email address--LOCKED

    Message pops up after lock screen that says:
    "iPad cannot backup without a verified email address"
    with the options of LATER and SETTINGS.  I usually select LATER button and move on.  This time it is locked up.  I tried a hard rest by pressing the home button and power/ sleep button but nothing happens. 
    I have not setup an iCloud account, and have not set up to sync with a Mac or PC. 
    Please help. 

    Thanks JimHdk,
    Can't get to the settings due to the error message.  It will not allow me to select an option. 
    I do believe that a hard reset is the answer, and i am able to go through to the black out screen, but the Apple logo is not coming up. 
    If I am unable to accmplish a hard reset today I may just have to make an appointment at the genius bar. 

  • Deleted contact email address

    I had to dump my gmail account as it was breached by a hacker and now I don't know how to change my contact email address!

    Hi
    Where are you trying to change your contact e-mail address?
    If its here, then you will need to change it on your AppleID. Go to http://appleid.apple.com/ to change it
    Taylor

  • When sending imessages my contact email address being displayed by the recipient

    when sending imessages my contact email address being displayed by the recipient, please could someone advice ?

    I found it in the Settings / Phone / Show My Caller ID - this is switched on - however I don't know if it will display my phone number or email address.

  • I cannot find MACs new 'Photos' in Finder under 'Media' when I try to attach a picture using Outlook 2011 for email.

    Hi I am using Outlook 2011 and i have today uploaded MAC's new 'Photos'. When I try and attach a photo Finder no longer show the IPhoto liv=brary in Finder under Media and there is no replacement.
    Help i need to send a photos using the attach button in an email in Outlook.
    Many thanks.

    as an additional issue i cannot find any method now of attaching a photo to an Outlook 2011 email using Photo (e.g. using the paperclip button or the media browser)
    This seems odd to me and there must be a work around.

  • Applescript and outlook 2011 reply email keeping original body

    Hi,
    I need help with an applescript.
    The idea is...
    I receive an email on Outlook 2011, and I can just run this applescript and it will create a response based on the original mail, with a predefined message.
    Right now it's working up to the point of creating a reply, adding the message and sending it. However, it is NOT keeping the original content of the message. that I'm replying to.
    Can someone help me with that part?
    I've tried many stuff and someone else helped me getting this one to work:
    tell application "Microsoft Outlook"
        set replyToMessage to selection
        if (replyToMessage is "") then -- nothing selected, don't continue
            log ("NOTHING SELECTED!")
            return
        end if
        set replyMessageSubj to subject of replyToMessage
        set replyMessage to reply to replyToMessage without opening window
        if has html of replyMessage then
            log ("HTML!")
            set the content of replyMessage to "<p>Working on HTML</p><br />"
        else
            log ("PLAIN TEXT!")
            set the plain text content of replyMessage to "Working on plain text"
        end if
        send replyMessage
    end tell
    Many thanks for the help.

    That's exactly what I needed to understand.
    The final one is like this in case someone else needs it:
    tell application "Microsoft Outlook"
        set replyToMessage to selection
        set mymessage to "Aqui se trapeo con jerga"
        set OldContent to content of replyToMessage
        if (replyToMessage is "") then
            log ("NOTHING SELECTED!")
            return
        end if
        set replyMessageSubj to subject of replyToMessage
        set replyMessage to reply to replyToMessage without opening window
        if has html of replyMessage then
            log ("HTML!")
            set the content of replyMessage to "Hello World<br> This is an HTML test<br><br><br><hr>" & OldContent
        else
            log ("PLAIN TEXT!")
            set the content of replyMessage to "Hello World<br> This is a plain text test <br><br><br><hr>" & OldContent
        end if
        open replyMessage
    end tell
    Many thanks for the help Llessur999!!

  • My correct contact email address is not being used...

    I do not use, and do wish to use, my allocated BTInternet email address and I have my normal Gmail address set up for my BT contact.  As a result I have the BTInternet address set up to permanently forward emails to the Gmail account.
    Despite my contact address being set to Gmail, I keep getting mails signed by Warren Buckley which are coming via the forwarding route from BTIinternet.
    The latest one heralds a problem.  It is telling me that, because of a change in the T&Cs, the BTInternet account will be closed if I do not actively access it every 150 days.  That is in addition to the fact that I recently had an email telling me that I must set up some new way of using the BTInternet account which, as I do not use the BTInternet account, I have no interest in doing.
    If this goes ahead I will, after 150 days, not receive any information emails from BT as I will have no account for WB's minions to send them to.
    I have submitted a communication about this under a "Technical help - Email or security software [Incident:130427-002xxx]" reference.  However, is there anything else I could do to get this anomoly corrected and emails sent to my real contact address at Gmail?

    Thank you for that.   I had not seen any other postings on the topic as I was unsure where to post this and I had used the wrong forum section and one of the mods has moved it here.
    The email I got never actually mentioned forwarding as a method of retention, so I hope you are correct. 
    What the email said was:
    How to keep your BT email
    Make sure you use your email at least once every 150 days by logging on at bt.yahoo.com, using your computer email software (like Microsoft Outlook or Mozilla Thunderbird) or checking your email on your smartphone. If you don't, we'll close the account and delete everything that goes with it - including your emails, contacts, calendar and notes.
    Edit:  I have now delved ito the T&Cs and I see the reference there.

  • Import outlook 2011 contacts into mail

    trying to move from Outlooks 2011 for Mac into Mac Mail and really struggling.
    Mail doesn't seem to import anything but 'mailboxes' and doesn't seem to read any of the export formats Outlooks offers.  (Outlook says tab delimited, Mail claims to want a CSV)
    I can't even figure out how to DISPLAY contacts in Mail.  If I know the email address it will autocomplete, and it says add sender but doesn't seem to ask for a name.
    Any refs or suggestions much appreciated.
    thanks

    You want to export your contacts as a vcard if that is an option, then import them into Contacts, not Mail. Mail use Contacts.
    To display Contacts in Mail, click New Message, and then the  blue + sign at the far right of the To field.

Maybe you are looking for