Mirra

_OL_ItemGet Error

12 posts in this topic

When i run the code for Contacts folder. Its working fine. But when i run for my mails folder getting error like below. Please help am a newbie.

$vItem = $oOL.Session.GetItemFromID($vItem, $sStoreID)
$vItem = $oOL.Session^ ERROR

The code i use,

Global $oOutlook = _OL_Open()

$aItems = _OL_ItemFind($oOutlook,"*\Inbox\MDAT",$olMail,"","","","EntryID","",0,"")
_ArrayDisplay($aItems, " _OL_ItemFind")
$aOL_Properties = _OL_ItemGet($oOutlook, $aItems[1][0],$olMail,"")
_ArrayDisplay($aOL_Properties)
_OL_Close($oOutlook)

Share this post


Link to post
Share on other sites



Just now, Mirra said:

Sorry wrong code was uploaded.Below is the right one.When i run the code for Contacts folder. Its working fine. But when i run for my mails folder getting error like below. Please help am a newbie.

$vItem = $oOL.Session.GetItemFromID($vItem, $sStoreID)
$vItem = $oOL.Session^ ERROR

The code i use,

Global $oOutlook = _OL_Open()

$aItems = _OL_ItemFind($oOutlook,"*\Inbox\MDAT",$olMail,"","","","EntryID","",0,"")
_ArrayDisplay($aItems, " _OL_ItemFind")
$aOL_Properties = _OL_ItemGet($oOutlook, $aItems[1][0])
_ArrayDisplay($aOL_Properties)
_OL_Close($oOutlook)

 

Share this post


Link to post
Share on other sites

Can you please post the full error message you get in the SciTE output pane?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

The below is the error i get in console.

"C:\*\AutoIt3\Include\OutlookEX.au3" (2941) : ==> The requested action with this object has failed.:
$aProperties[$iCounter][1] = $oProperty.value
$aProperties[$iCounter][1] = $oProperty^ ERROR
>Exit code: 1    Time: 3.244

 

Thanks,

Water

Share this post


Link to post
Share on other sites

Which version of AutoIt do you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I use Autoit V3; OutlookEX_1.1.0.1

Share this post


Link to post
Share on other sites

Yes, but which exact version ?
What do you get when you run

MsgBox(0, "", @AutoitVersion)

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

3.3.14.2

Share this post


Link to post
Share on other sites

That's what I feared. The Outlook UDF has not been tested with this version.
Could be a bug with the new way AutoIt 3.3.14.x handles COM errors.

Will post some code for you to play with ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Whoops :( Okay! I really appreciate your help! :D 

Share this post


Link to post
Share on other sites

Search the following lines in the UDF source code (function _OL_Open):

; Activate the COM error handler for older AutoIt versions
If $__iOL_Debug = 0 And Number(StringReplace(@AutoItVersion, ".", "")) < 3392 Then

and replace them with

; Activate the COM error handler for older AutoIt versions
If $__iOL_Debug = 0 And (Number(StringReplace(@AutoItVersion, ".", "")) < 3392 Or Number(StringReplace(@AutoItVersion, ".", "")) > 33120) Then

Now the COM error handler should be activated when running a version of AutoIt that can be crashed by  a COM error.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks! Will let you know once i try.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now