Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Number -10004 on Script Execution #4

Open
benmjohnson opened this issue Mar 18, 2013 · 1 comment
Open

Error Number -10004 on Script Execution #4

benmjohnson opened this issue Mar 18, 2013 · 1 comment

Comments

@benmjohnson
Copy link

At some point, possibly after upgrading to OS X 10.8.2, the archive script stopped working for me. The root of the issue was that the (current date) method was returning "error number -10004" rather than the appropriate date.

I fixed this by moving the (current date) method outside of the tell block. For example:

on archiveExchangeFolders(exchangeFolders, excludedFolders, archiveRootFolder, daysBeforeArchive)
    set dateNow to (current date)

    tell application "Microsoft Outlook"

        -- Calculate the earliest date of mail that must remain on exchange server
        set earliestDate to (dateNow - (daysBeforeArchive * days))
        log "Earliest Date - " & earliestDate
@smneedham
Copy link
Owner

Thanks for the feedback Ben, and sorry for long delay in replyin. I'll update the code in the next release to make this tweak, thanks for helping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants