Applescript 他对与会者表示欢迎 将与会者的属性设置为与会者的属性 将att_name设置为((与会者属性的电子邮件地址的名称))作为字符串) 将att_电子邮件设置为((与会者属性的电子邮件地址))作为字符串) 使用属性{email address:{name:att

Applescript 他对与会者表示欢迎 将与会者的属性设置为与会者的属性 将att_name设置为((与会者属性的电子邮件地址的名称))作为字符串) 将att_电子邮件设置为((与会者属性的电子邮件地址))作为字符串) 使用属性{email address:{name:att,applescript,outlook-2011,Applescript,Outlook 2011,他对与会者表示欢迎 将与会者的属性设置为与会者的属性 将att_name设置为((与会者属性的电子邮件地址的名称))作为字符串) 将att_电子邮件设置为((与会者属性的电子邮件地址))作为字符串) 使用属性{email address:{name:att_name,address:att_email}使新的资源与会者位于theID 结束重复 --发送会议ID——不要发送会议,首先给所有者一个编辑的机会 开放式ID 结束语 回来 结束复制事件 --------------------------

他对与会者表示欢迎 将与会者的属性设置为与会者的属性 将att_name设置为((与会者属性的电子邮件地址的名称))作为字符串) 将att_电子邮件设置为((与会者属性的电子邮件地址))作为字符串) 使用属性{email address:{name:att_name,address:att_email}使新的资源与会者位于theID 结束重复 --发送会议ID——不要发送会议,首先给所有者一个编辑的机会 开放式ID 结束语 回来 结束复制事件 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 小写字母(aString) 将NewString设置为执行shell脚本“echo”&aString&“tr'[A-Z]''[A-Z]'” 返回新闻字符串 结尾小写
(*

--------------------------------------------
Duplicate Calendar Event 1.0
-------------------------------------------

based on "Set Custom Reminder 1.0" by William Smith <bill@officeformachelp.com>

It is only compatible with Outlook for Mac 2011.
--------------------------------------------

This script duplicates a calendar event that has attendees.

(Outlook supports option-click-drag to copy a pure appointment event, one with no
attendees, but does not support any means of copying or duplicating a meeting
event with attendees)


*)

tell application "Microsoft Outlook"

    -- Is the event selected in the Calendar view of the Main Window?

    if class of front window is main window and view of front window is calendar view then

        -- If so...

        set orig_event to the selection

        if class of orig_event is calendar event then

            my copy_event(orig_event)

        end if

        -- Is this a new unsaved appointment or meeting?

    else if class of front window is window and object of front window is missing value then

        -- If so...

        display dialog "Unsaved events cannot be copied. Save your event and run this script again." with title "Alert!" with icon 2 buttons {"OK"} default button {"OK"}

    else if class of front window is window and (class of object of front window) is calendar event then

        -- If so...

        set orig_event to object of front window

        my copy_event(orig_event)

    else

        -- No calendar event appears to be selected or open. Therefore...

        display dialog "Select an event from your calendar first or open its window." with title "Alert!" with icon 2 buttons {"OK"} default button {"OK"}
    end if

end tell


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

on copy_event(orig_event)

    tell application "Microsoft Outlook"

        set the_properties to properties of orig_event

        set Loc to ""
        --set Rec to ""  -- don't know how to handle recurrence since it itself is a list
        set RecID to ""
        set Subj to ""
        set StarT to ""
        set StarD to ""
        set EndT to ""
        set EndD to ""
        set Cont to ""
        set Rem to ""

        if ((location of the_properties) as string) does not contain "missing value" then set Loc to (location of the_properties)
        if ((recurrence id of the_properties) as string) does not contain "missing value" then set RecID to (recurrence id of the_properties)
        if ((subject of the_properties) as string) does not contain "missing value" then set Subj to ((subject of the_properties) as string)
        if ((start time of the_properties) as string) does not contain "missing value" then set StarT to (start time of the_properties)
        if ((end time of the_properties) as string) does not contain "missing value" then set EndT to (end time of the_properties)
        if ((content of the_properties) as string) does not contain "missing value" then set Cont to (content of the_properties)
        if ((reminder time of the_properties) as string) does not contain "missing value" then set Rem to (reminder time of the_properties)
        set Cat to (category of the_properties)

        make new calendar event with properties ¬
            {location:Loc, subject:Subj, content:Cont, start time:StarT, end time:EndT, reminder time:Rem, category:Cat}

        set theID to the result
        --display dialog "created new event"


        set the_attendees to every optional attendee of orig_event
        set attendee_count to count of the_attendees
        --display dialog "event has " & attendee_count & " optional attendees"
        repeat with an_attendee in the_attendees
            set attendee_properties to properties of an_attendee
            set att_name to ((name of (email address of attendee_properties)) as string)
            set att_email to ((address of (email address of attendee_properties)) as string)
            make new optional attendee at theID with properties {email address:{name:att_name, address:att_email}}
        end repeat

        set the_attendees to every required attendee of orig_event
        set attendee_count to count of the_attendees
        --display dialog "event has " & attendee_count & " required attendees"
        repeat with an_attendee in the_attendees
            set attendee_properties to properties of an_attendee
            set att_name to ((name of (email address of attendee_properties)) as string)
            set att_email to ((address of (email address of attendee_properties)) as string)
            make new required attendee at theID with properties {email address:{name:att_name, address:att_email}}
        end repeat

        set the_attendees to every resource attendee of orig_event
        set attendee_count to count of the_attendees
        --display dialog "event has " & attendee_count & " resource attendees"
        repeat with an_attendee in the_attendees
            set attendee_properties to properties of an_attendee
            set att_name to ((name of (email address of attendee_properties)) as string)
            set att_email to ((address of (email address of attendee_properties)) as string)
            make new resource attendee at theID with properties {email address:{name:att_name, address:att_email}}
        end repeat

        --send meeting theID -- don't send the meeting, give owner a chance to edit first
        open theID

    end tell

    return

end copy_event

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

on lowercase(aString)
    set NewString to do shell script "echo " & aString & " | tr '[A-Z]' '[a-z]'"
    return NewString
end lowercase