exodius Posted July 12, 2010 Share Posted July 12, 2010 Could someone help me with what I should be putting differently in this translation?Taking this code from the Outlook Redemption website:skPrimaryExchangeMailbox = 3 skDelegateExchangeMailbox = 4 set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Application.Session.MAPIOBJECT set Store = Session.Stores.DefaultStore if (Store.StoreKind = skPrimaryExchangeMailbox) or (Store.StoreKind = skDelegateExchangeMailbox) Then set OOFAsistant = Store.OutOfOfficeAssistant OOFAsistant.OutOfOffice = true OOFAsistant.OutOfOfficeText = "Sorry, I am out of office at the moment!" Else MsgBox "Out Of Office Assistant is only available for the Exchange mailboxes" End IfI came up with:$skPrimaryExchangeMailbox = 3 $skDelegateExchangeMailbox = 4 $oOutlook = ObjCreate("Outlook.Application") $oSession = ObjCreate("Redemption.RDOSession") $oSession.MAPIOBJECT = $oOutlook.Session.MAPIOBJECT $oStore = $oSession.Stores.DefaultStore if $oStore.StoreKind = $skPrimaryExchangeMailbox or $oStore.StoreKind = $skDelegateExchangeMailbox Then $OOFAssistant = $oStore.OutOfOfficeAssistant $OOFAssistant.OutOfOffice = true $OOFAssistant.OutOfOfficeText = "Sorry, I am out of office at the moment!" Else MsgBox (0, "", "Out Of Office Assistant is only available for the Exchange mailboxes") EndIfBut it doesn't so much work.I'm pretty sure my implementation is off where I reference $oOutlook.Session.MAPIOBJECT, but I don't know what else to put there. Any thoughts? Link to comment Share on other sites More sharing options...
water Posted July 12, 2010 Share Posted July 12, 2010 Please search the forum for "MAPIOBJECT" and/or "Redemption.RDOSession". There are some hits that might help you. I'm not good with Outlook, just with the search function My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
exodius Posted July 12, 2010 Author Share Posted July 12, 2010 Figured it out, seems like the example on their website must not be updated to the latest syntax or something... Here's what resolved it for me: $skPrimaryExchangeMailbox = 3 $skDelegateExchangeMailbox = 4 $oSession = ObjCreate("Redemption.RDOSession") $oSession.Logon $oStore = $oSession.Stores.DefaultStore if $oStore.StoreKind = $skPrimaryExchangeMailbox or $oStore.StoreKind = $skDelegateExchangeMailbox Then $OOFAssistant = $oStore.OutOfOfficeAssistant $OOFAssistant.OutOfOffice = true $OOFAssistant.OutOfOfficeText = "Sorry, I am out of office at the moment!" Else MsgBox (0, "", "Out Of Office Assistant is only available for the Exchange mailboxes") EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now