W
Will Smith
I have a wsh script that takes a message from the inbox,
saves the attachment to a network location and closes out
of Outlook. I need to figure out how to move the message
to a subfolder and send out a success email and THEN close
Outlook. Here is the actual code I am using right now:
<job>
<script language="VBScript">
dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objOL = WScript.CreateObject ("Outlook.Application")
Set MAPI = objOL.GetNamespace("MAPI")
Set myStore = MAPI.Folders("Mailbox - Tunisia Information")
Set Folder = myStore.Folders("Inbox")
For Each myItem In Folder.Items
For Each att In myItem.Attachments
att.SaveAsFile "\\naslc03
\data\TunisiaProdData\" & att.Filename
Next
Next
objOL.quit
</script>
</job>
Any help would be greatly appreciated. Thanks.
saves the attachment to a network location and closes out
of Outlook. I need to figure out how to move the message
to a subfolder and send out a success email and THEN close
Outlook. Here is the actual code I am using right now:
<job>
<script language="VBScript">
dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objOL = WScript.CreateObject ("Outlook.Application")
Set MAPI = objOL.GetNamespace("MAPI")
Set myStore = MAPI.Folders("Mailbox - Tunisia Information")
Set Folder = myStore.Folders("Inbox")
For Each myItem In Folder.Items
For Each att In myItem.Attachments
att.SaveAsFile "\\naslc03
\data\TunisiaProdData\" & att.Filename
Next
Next
objOL.quit
</script>
</job>
Any help would be greatly appreciated. Thanks.