Sign in to follow this  
Followers 0
smellyfingers

Outlook 2013 window

5 posts in this topic

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 !

Share this post


Link to post
Share on other sites



Use my OutlookEX UDF ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-02-03 - Version 1.4.7.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-03 - Version 1.2.4.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by smellyfingers

Share this post


Link to post
Share on other sites

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 2017-02-03 - Version 1.4.7.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-03 - Version 1.2.4.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Ok, ill need to look into that, thanx :)

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
Sign in to follow this  
Followers 0

  • Similar Content

    • water
      By water
      Anyony interested in a function to retrieve the Outlook mailbox quotas for Exchange mailboxes?
      If yes, then this function could be added to the OutlookEX UDF.
      Result could look like (will later be returned in an array):
       
    • ur
      By ur
      I wrote a macro for outlook to send an email.
      Till yesterday it worked, don't know why it is not working today
      I am getting below error when I ran the macro.
       

    • ur
      By ur
      Through below script I am able to send mail with the Outlook installed in my machine.
       
      But I am getting below prompt whenever I ran this script,by Outlook.
      Can anyone suggest how to suppress this.
      #include <MsgBoxConstants.au3> ; Counting the number of open shell windows Local $oShell = ObjCreate("Outlook.Application") ; Get the Windows Shell Object If IsObj($oShell) Then $Mail = $oShell.CreateItem(0) $Mail.To = "dponnada@erwin.com" $Mail.Subject = "Action" $Mail.Body ="Pay rise please" $Mail.Send() EndIf  

    • visler
      By visler
      Hi all

      I been using autoit some years ago and needed a tool for changing various in outlook so i found autoit again and i allready succeed in some of this, but i cant find and delete an appointment.
      I have found this example and the creation is ok (after i changed $oOL/$oOutlook typo)
      Https://www.autoitscript.com/wiki/OutlookEX_UDF_-_Meeting_Item
      But i cant get the delete part to work and i keep on getting "not found" and an empty array (screen shoot of _ArrayDisplay attached)
      Please can someone tell me what i am missing, i have been searching and trying various but stil i have no luck in finding any items.

      I am using outloook 2013 and office365. I have been able to send mails and create appointment, so i guess my problem is not due to the use off office365.

       

    • Dent
      By Dent
      Hi, I have written the following code and although the email is successfully created from a template it just sits in my draft folder without being sent and I can't figure out why?
      #include <OutlookEX.au3> $Email = "test@test.com" $Outlook = _OL_Open() $olItem = _OL_ItemCreate($Outlook, 1, "", "Feedback.oft", "To=" & $Email) _OL_ItemSend($Outlook, $olItem, Default) _OL_Close($Outlook) Place Feedback.oft in the same folder as the script for it to run. Oh and you have to have a working Outlook installation and mail profile set up
      SOLVED changed the 1 to $olMailItem
       
      Feedback.oft