smellyfingers Posted May 6, 2014 Posted May 6, 2014 Hi, i've been trying to get text from active Outlook 2013 window to read the mailbody text but it seems i need to do it with com instead, but how do i create the object from the active window and only if it's an actual active window of a mail only then retrieve the text in the body? Any pointers were to start even would be helpful Thanx !
water Posted May 6, 2014 Posted May 6, 2014 Use my OutlookEX UDF My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
smellyfingers Posted May 6, 2014 Author Posted May 6, 2014 (edited) Yeah that would be cool if i knew how to connect to the active object still. Like i know how to open the recent mail like this: Global Const $InBox = 6 Global $outlook = ObjCreate("Outlook.Application") Global $NameSpace = $outlook.GetNamespace("MAPI") $InboxItems = $NameSpace.GetDefaultFolder($InBox).Items ;MsgBox(0,"",$InboxItems.Count) Local $myFolder = $NameSpace.GetDefaultFolder($Inbox) Local $myItem = $myFolder.Items($InboxItems.Count) $myItem.Display But if i allready have a mail open, how do i retrieve that info into a variable? Edited May 6, 2014 by smellyfingers
water Posted May 6, 2014 Posted May 6, 2014 I'm not in my office at the moment but I think you need the ActiveInspector method. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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