set destPath to "Waiareka HD:Users:nstanger:Documents:Research:Spam filtering:Corpus:" tell application "Microsoft Entourage" to set theMessages to (get current messages) repeat with thisMsg in theMessages tell application "Microsoft Entourage" set theFilename to ID of thisMsg as string set theSource to source of thisMsg as string end tell set outFile to open for access file (destPath & theFilename & ".txt") with write permission write theSource to outFile close access outFile end repeat beep