There must already be an AppleScript out there for combining a group of Outlook Express e-mails into a single word processing or text file. Does anyone know about this?
Thanks for your help!
Atik
There must already be an AppleScript out there for combining a group of Outlook Express e-mails into a single word processing or text file. Does anyone know about this?
Thanks for your help!
Atik
If you drop the folder containing such messages to your desktop, it should be created a file called “foldername.mbox”. You can open such file in any text editor and browse it (if needed, rename it to .txt)
Thanks, jj, but I tried dragging the folder icon to the desktop and no such file was created. The icon of the folder just zipped back into the OE window, indicating that I’d tried to do something the software doesn’t support. Maybe it’s a version thing? I’m using OE 5.02 on OS 9.2.2.
:oops:
Perhaps it’s a feature-not-in-5.0.2…
Is it the same if you drop a single email to the desktop? (it should/maybe created a .eml file). If it does work, drop all emails to a folder and run anything similar to:
set sourceFolder to (choose folder with prompt "Where is the folder to read messages from?")
set destFile to (choose file name with prompt "Where should I save all merged messages?")
set folderContents to (list folder sourceFolder without invisibles)
repeat with i in folderContents
set fileContents to (read alias ((sourceFolder as text) & i))
my appendText(fileContents, destFile)
end
beep 3
to appendText(txt, toFile)
set fRef to (open for access toFile with write permission)
write txt & return to fRef starting at eof
close access fRef
end
If this doesn’t work, then you can still read every message from Outlook and follow the same procedure:
set destFile to (choose file name with prompt "Where should I save all merged messages?")
tell application "Outlook Express"
repeat with i from 1 to count messages of folder "Inbox"
my appendText(source of message i of folder "Inbox", destFile)
end repeat
end tell
to appendText(txt, toFile)
set fRef to (open for access toFile with write permission)
write txt & return to fRef starting at eof
close access fRef
end appendText
Consider that I’m running Panther, and I can’t test this code in OS 9.2.2 nor Outlook 5.0.2.