Jump to content

Recommended Posts

Posted (edited)

Water maybe you can strike again whit these one!

Thank you so much for your contributions!!

We have a lot of questions !

Trying to visualize the body..

#include <OutlookEX.au3>
Global $aAttachments

; Connect to Outlook
Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error opening connection to Outlook. @error = " & @error & ", @extended = " & @extended)

; Access the Inbox
Global $aFolder = _OL_FolderAccess($oOutlook, "", $olFolderInbox)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error accessing the Inbox. @error = " & @error & ", @extended = " & @extended)

;Leer arbol de carpetas
Global $iLevel = 9999
Global $nTreeF =_OL_FolderTree($oOutlook, $aFolder[1],$iLevel)
Global $nItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[UnRead]=True", "", "", "EntryID,Subject,SenderEmailAddress", "", 4)

Global $busqueda = "RV: Emision de comprobante virtual"
Global $aSearchArray[2][4] = [[1, 4],[0x0037001E, 1, $busqueda]]

; Search for unread items with attachments
;Global $sFilter = "@SQL=""urn:schemas:httpmail:hasattachment"" = 1 and ""urn:schemas:httpmail:read""=0"
Global $sFilter = "@SQL=""urn:schemas:httpmail:read""=0"
Global $aResult = _OL_ItemSearch($oOutlook, $aFolder[1], $sFilter, "EntryID,subject,SenderEmailAddress")
;Global $aResult = _OL_ItemSearch($oOutlook, $aFolder[1], $aSearchArray, "EntryID,subject,urn:schemas:httpmail:textdescription,SenderEmailAddress")

; Find all items in the inbox
;Global $aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "", "", "", $olDistributionList, "", 1)
;Global $oItem = $oOutlook.Session.GetItemFromID($aItems[1][0], Default) ; retrieve the items object
;$sBody = $oItem.Body

If @error Then
    MsgBox(16, "OutlookEX UDF - _OL_ItemSearch Example Script", "Error running _OL_ItemSearch. @error = " & @error & ", @extended = " & @extended)
Else

    _ArrayDisplay($nTreeF, "Outlook Informacion de arbol desde el folder" & $nItems)
    _Arraydisplay($aResult, "Example 6")
    ;_Arraydisplay($aItems, "Body")
EndIf

 

 

Edited by ElRojo

Share this post


Link to post
Share on other sites

We also try these one of Water 

Our goal is to obtain the body of an email and save it in a file where you can use it
Excel for example
 

#include <Outlook.au3>

;verificacion del total de mails sin leer
$oOutlook = _OutlookOpen()
$eR = _OutlookGetMail($oOutlook, $olFolderInbox, False, "", "", "", "", "", "", True, "", 0, True)
MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & $eR[1][9] & " of them are unread")
_Arraydisplay($eR, "correos")

William Programador: MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & $eR[1][9] & " of them are unread")
MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & ^ ERROR

 

Share this post


Link to post
Share on other sites
Posted (edited)

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

Water maybe you can strike again whit these one!

Thank you so much for your contributions!!

We have a lot of questions !

Trying to visualize the body..

#include <OutlookEX.au3>
Global $aAttachments

; Connect to Outlook
Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error opening connection to Outlook. @error = " & @error & ", @extended = " & @extended)

; Access the Inbox
Global $aFolder = _OL_FolderAccess($oOutlook, "", $olFolderInbox)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error accessing the Inbox. @error = " & @error & ", @extended = " & @extended)

;Leer arbol de carpetas
Global $iLevel = 9999
Global $nTreeF =_OL_FolderTree($oOutlook, $aFolder[1],$iLevel)
Global $nItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[UnRead]=True", "", "", "EntryID,Subject,SenderEmailAddress", "", 4)

Global $busqueda = "RV: Emision de comprobante virtual"
Global $aSearchArray[2][4] = [[1, 4],[0x0037001E, 1, $busqueda]]

; Search for unread items with attachments
;Global $sFilter = "@SQL=""urn:schemas:httpmail:hasattachment"" = 1 and ""urn:schemas:httpmail:read""=0"
Global $sFilter = "@SQL=""urn:schemas:httpmail:read""=0"
Global $aResult = _OL_ItemSearch($oOutlook, $aFolder[1], $sFilter, "EntryID,subject,SenderEmailAddress")
;Global $aResult = _OL_ItemSearch($oOutlook, $aFolder[1], $aSearchArray, "EntryID,subject,urn:schemas:httpmail:textdescription,SenderEmailAddress")

; Find all items in the inbox
;Global $aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "", "", "", $olDistributionList, "", 1)
;Global $oItem = $oOutlook.Session.GetItemFromID($aItems[1][0], Default) ; retrieve the items object
;$sBody = $oItem.Body

If @error Then
    MsgBox(16, "OutlookEX UDF - _OL_ItemSearch Example Script", "Error running _OL_ItemSearch. @error = " & @error & ", @extended = " & @extended)
Else

    _ArrayDisplay($nTreeF, "Outlook Informacion de arbol desde el folder" & $nItems)
    _Arraydisplay($aResult, "Example 6")
    ;_Arraydisplay($aItems, "Body")
EndIf

 

 

Edited 5 hours ago by ElRojo
 
  •  

ElRojo

  • Seeker
  • Members
  • 0
  • 5 posts

We also try these one of Water 

Our goal is to obtain the body of an email and save it in a file where you can use it
Excel for example
 

#include <Outlook.au3>

;verificacion del total de mails sin leer
$oOutlook = _OutlookOpen()
$eR = _OutlookGetMail($oOutlook, $olFolderInbox, False, "", "", "", "", "", "", True, "", 0, True)
MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & $eR[1][9] & " of them are unread")
_Arraydisplay($eR, "correos")

William Programador: MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & $eR[1][9] & " of them are unread")
MsgBox(0, '', "You have a total of " & $eR[0][0] & " mails in your inbox. " & ^ ERROR

Share this post


Link to post
Share on other sites

What kind of problems do you encounter?
Do you get an error when calling a _OL_* function?
Do you get no body or a truncated body?

Please explain in detail what your problem is.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...