Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Move email to another folder in Outlook

$
0
0

Hello,

I'm trying to do some work using the Outlook UDF. I can't figure out how to move email which I have just sent from the sent folder to another folder which I have created.

As you can guess, I'm no expert so please bear with me.

Here's my code

Global $oOutlook = _OL_Open() $oItem = _OL_Wrapper_SendMail($oOutlook, "blahblah@outlook.com", "", "", "New Requisition", "") _OL_ItemMove($oOutlook, $oItem, "*\Sent Items", "*\Requisitions\1. Submitted")

when i run it falls over with this error message

 

"C:\Program Files\AutoIt3\Include\OutlookEX.au3" (3125) : ==> Variable must be of type "Object".:
If $oSourceFolder.DefaultItemType <> $vTargetFolder.DefaultItemType Then Return SetError(2, 0, 0)
If $oSourceFolder^ ERROR
 
Thanks  :wacko:

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>