Jump to content

Recommended Posts

Posted

The SQL generator inside Outllook define the body as textdescription.

("urn:schemas:httpmail:subject" LIKE '%ACS%' AND "urn:schemas:httpmail:textdescription" LIKE '%TEST%')

 

Posted

Is the mail formatted as HTML or Rich Text?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

Ah, I remember.
With DASL you can't retrieve the whole body. You only get the first 255 bytes of the body:

#include <OutlookEX.au3>
#include <Array.au3>
Global $oOutlook = _OL_Open()
$sTerm = "ACS"
$sInbox = "*\Posteingang"
$sSQL = "@SQL=urn:schemas:httpmail:subject ci_startswith " & "'" & $sTerm & "'"
Global $aItems = _OL_ItemSearch($oOutlook, $sInbox, $sSQL, "EntryId,Subject,urn:schemas:httpmail:textdescription")
ConsoleWrite(@error & @CRLF)
_ArrayDisplay($aItems)
_OL_Close($oOutlook)

So if you need the full body you would need to call _OL_ItemGet for each found mail item.

Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Hello Water,

thx for reply thats also possible. :-)

One further question: if i choose the property inside the Function _OL_ItemGet(), it returns error.

But if i let the Property emtpy, it returns the complete E-Mail with all prpoerties inside the array...

Do you know why?

Global $aItems = _OL_ItemGet($oOutlook, 'EF0000009B491F81D6791A47AA9A1EC0758DAA05245A2A00',"Body")

 BR

horphi

Posted

If you do not specify any properties to return then all properties will be returned (default). So WAD.

You missed to specify the StoreID. Try:

Global $aItems = _OL_ItemGet($oOutlook, 'EF0000009B491F81D6791A47AA9A1EC0758DAA05245A2A00', Default, "Body")

 

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Damned you are right....

I forgot to set the $sStoreID on default.....sry for that stupid question....:-(

Thanks anyway...:-)

Posted

:)

My UDFs and Tutorials:

  Reveal hidden contents

 

  • 4 weeks later...
Posted

Hello,

I am using Outlook 2013. Will this UDF work? I just want to check the calender for a specific time slot and return a value if it is free or not. 

Is this possible?

Please let me know.

Thanks,

 

 

 

Posted (edited)
  On 8/24/2015 at 6:24 PM, VishnuNair said:

Hello,

I am using Outlook 2013. Will this UDF work? I just want to check the calender for a specific time slot and return a value if it is free or not. 

Is this possible?

Please let me know.

Thanks,

 

 

 

Hi VishnuNair,

yes i´m working also with MS Outl 2013. I works fine.

BR

Horphi

Edited by horphi
Posted

I only have Office 2010 available and so would like to hear of any problems you notice with Office 2013.

My UDFs and Tutorials:

  Reveal hidden contents

 

  • 1 month later...
Posted

I am on a business trip right now. Will  reply as soon as I return to my office. 

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Function _OL_ApplicationGet returns an array filled with information about Outlook. Element 1 is the name of the default profile.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

Can't test at the moment but I think it is

$oNameSpace = $oOutlook.GetNameSpace("MAPI") 
 MsgBox(0, "", $oNameSpace.CurrentUser.Name)

 

Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

I see. But this works - at least as you are logged on as the default account.

#include <OutlookEX.au3>
$oOL = _OL_Open()
$oNameSpace = $oOL.GetNameSpace("MAPI")
MsgBox(0, "", $oNameSpace.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress)
_OL_Close($oOL)

 

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

That is close to what I wanted. But this gives me the name of my email address. The actual account name can differ from that, if the user has renamed the account.

What I'm trying to achieve with this:
I wanna find out which registry folder (0000000X) is connected with the default Email account.

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Profiles\" & $DefaultOutlookProfile & "\9375CFF0413111d3B88A00104B2A6676\00000001 <---

00000001
00000002
00000003
etc.

In my case I know that 00000003 is the folder containing settings for my main Email account. This I know because the REG_BINARY value named Account Name inside the 00000003 folder, contains the name of my default account, which in this case is "NameOfMyAccount"

So if I could get the name of the default account I could:
"If $StringAccountName = $DefaultAccount Then....."

 

I hope that I make myself clear. Maybe you have another suggestion to how I could achieve this?

Thanks!


David

Edited by david1337

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...