Geek
August 10, 2017, 6:23pm
1
Hello Everyone,
How can I copy an email message(s) in Outlook. I don’t want to move them, just copy from the Inbox to another sub-folder.
I assume I begin by picking up the messages, then do a ‘for each’ email in messages, … (need help here)
Thanks!
vvaidya
(Vinay Vaidya)
August 10, 2017, 6:55pm
2
Use this as a last resort
Send to Self
Move to Subfolder
This way it will be duplicated, but again the Mail in the Inbox has to be unread.
Geek
August 10, 2017, 6:58pm
3
Thank you. Hope there’s another solution out there!
Geek
August 10, 2017, 7:27pm
4
Sorry, but how to accomplish #2 ? I thought I knew, but that doesn’t seem to work. You say the email will be duplicated. I’m ok with the duplication.
Geek
August 14, 2017, 4:15pm
5
Any other thoughts on this?!
Geek
September 20, 2017, 8:12pm
7
I ended up solving the issue by using “Invoke PowerShell” activity and wrote a custom script to copy emails based on subject. You can also specify based on EmailID, From, BCC, etc.
Emails are being copied from Inbox\SubFolder to SentItems\TEMP, where “Email_Subject” is a variable being passed into the PS code.
Hope someone else finds some use in this!
$outlook = New-Object -comobject outlook.application;
$Inbox = $outlook.GetNamespace('MAPI').GetDefaultFolder(6);
$subFolders = $Inbox.Folders | ? {$_.FolderPath.EndsWith('SubFolder')};
$SendItems = $outlook.GetNamespace('MAPI').GetDefaultFolder(5);
$subFolders2 = $SendItems.Folders | ? {$_.FolderPath.EndsWith('TEMP')};
$Final = $subFolders.Items | ForEach-Object {If ($_.Subject -Like '*"+Email_Subject+"*'){$_.Copy().Move($subFolders2)}}
3 Likes