Jump to content
Sign in to follow this  
water

OutlookEX UDF - Help & Support (III)

Recommended Posts

Parameter $bShowProgress is set to False or you use the default setting?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Parameter $bShowProgress is set to False or you use the default setting?

Oh god, you're right. $bShowProgress was set to True. I just took the code from _OL_ItemSendReceive.au3 into my script. Changed to False, and the popup windows are gone. Many thanks.

BTW, OutlookOE doesn't have a simple ItemReceive, does it? That would be sufficient in my case, as Outlook is set to send immediately. So the local email server is always uptodate.

Share this post


Link to post
Share on other sites

That's one single method to send and receive all pending items. You can't just receive new items.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Continuing with this >thread here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

I have a nother example how to handle "Send" events. I will post as soon as I'm back in my office again.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Hello,

Trying to reschedule a repeating meeting which seems to work OK using _OL_ItemRecurrenceSet but we found a problem in that if we use _OL_ItemSend to send the notifications then there will be 2 meeting items listed in the Outlook calendar.  If we don't send then users on the other end don't receive the meeting update.

Any suggestions for updating the meeting schedule and sending out updates without getting a new entry on the Calendar?

Thanks.

Share this post


Link to post
Share on other sites

Can you please post your code so I can have a look?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Stripped down but basically:

Global $oOL = _OL_Open()
$aResult = _OL_ItemFind($oOL, "*Calendar", $olAppointment, "[subject]='" & $sSubject & "'", "", "", "EntryID")
$aPatten = _OL_ItemRecurrenceGet($oOL, $aResult[1][0], Default)
$oItem=_OL_ItemRecurrenceSet($oOL, $aResult[1][0], Default, $sStartDate, $sStartTime, int($sCount), $sEndTime, $sFREQ, $iDayOf, "", "")
_OL_ItemSend($oOL, $oItem)
_OL_Close($oOL)

Share this post


Link to post
Share on other sites
Water was kind enough to direct me here when I posted in the wrong forum location.
 
I am creating an outlook macro that launches a compiled autoit script that will manipulate the sent email.  I can pass the EntryID to the script as a command line parameter as follows:
 
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Shell ("C:TMRTest3.exe " & Item.EntryID)
End Sub
 
The parameter is accessible to the script in the $CmdLine array.  $CmdLine[1] holds the first command line item, or the EntryID..
 
Interestingly enough, the script seems to have some problem with the EntryID it obtains as a command line parameter.  It appeared there would be no problem, but when I run the following I get an error (@error = 2) showing that the item could not be found.
 
Global $oOutlook = _OL_Open()
Global $aOL_Properties = _OL_ItemDisplay($oOutlook, $CmdLine[1])
 
I have a working version of a script that waits in the background and captures a sent item for manipulation.  I have been using this myself for a long time.  It works well and I can continue to use it.  However, on a rare occasion an error may occur in the script due to something unexpected and it must be restarted.  With the approach I am pursuing the script would be run fresh every time an email is sent and it would be very fault tolerant and use fewer system resources.  The EntryID would be passed to the script and the email manipulated accordingly.
 
I have a second script that I use for received emails where I select the emails to be manipulated and then use a macro to launch the script.  It is more fault tolerant than my sent email script.  It is what I am trying to pattern this rebuild around.
 
I have two ideas:
 
it seems possible that the EntryID is changing from the one I am collecting with the macro.  My research shows that the EntryID changes when an email is moved from folder to folder.  Perhaps the EntryID the macro is returning is the one given when it is in the outbox before it goes to the sent items folder.  The method in the macro is "Application_ItemSend" and I believe allows manipulation of the email before it is actually sent.  That would account for the script being unable to locate the item based on that EntryID.  What I really need is an "Application_ItemSent" method, though that does not exist.  Alternatively a way to tell the macro to send the email and then poll the EntryID from the Sent Items folder.  
 
Alternatively, I would need a some programming in the script to identify and return the EntryID of the most recently sent email.
 
Any help on either of these approaches would be greatly appreciated.

Share this post


Link to post
Share on other sites

pfiore,

can you please write the value of @error and @extended after each call of a _OL_* function to the Console?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

SkoubyeWan,
the EntryID is created whenever an item is created in a folder. This means that the event gets the EntryID of the item from the drafts folder. When it is then being sent it is moved to the sent items folder and gets a new EntryID.
You could try to pass the item object to your script (not sure if this works) and then get the new EntryID if needed.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Okay.  I got this worked out.  Instead of using the _ItemSend method, I use the _ItemAdd method.  In this way, the EntryID doesn't change.

Here is the Outlook Macro code for triggering the AutoIt script:

Option Explicit

Public WithEvents oSentItems As Items
 
Public Sub Application_Startup()
    Set oSentItems = Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
 
Private Sub OSentItems_ItemAdd(ByVal Item As Object)
  Shell ("C:\TMR\TMR-SaveSentEmailsNow.exe " & Item.EntryID)
End Sub

Here is a simplified script code showing how the EntryID can be used in the script:

#include <OutlookEX.au3>
#include <Array.au3>

$oOL = _OL_Open()
$EntryId = $cmdlineraw
$Item = _OL_ItemGet($oOL, $EntryId,Default,"Subject,SenderName,To,SentOn")
_ArrayDisplay($item)

_OL_Close($oOL)

Hope this helps someone else.

Share this post


Link to post
Share on other sites

Thanks for the info!

Is "olFolderInbox" correct? Shouldn't it be "olFolderSentMail" to monitor sent mails? If I'm not wrong then olFolderInbox monitors incomming new mails?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

:)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

What's the value of @error you get displayed in the msgBox?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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

Great, that's a bug!

As you can see there are 5 rows and 5 columns in the array ([5][5]). The parameters for _ArrayDisplay have changed, but I still haven't changed all example scripts.

Replace

_ArrayDisplay($aResult, "OutlookEX UDF: _OL_AddressListGet Example Script - All address lists", _
    -1, 0, "", "|", "Row|OlAddressListType|Name|Index|Resolving order|Identifier")

with

_ArrayDisplay($aResult, "OutlookEX UDF: _OL_AddressListGet Example Script - All address lists")

I will change the examples as soon as most users have upgraded to version 3.3.10.2 of AutoIt (because the fixed examples won't run with 3.3.8.1).


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-06-17 - Version 1.5.0.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.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
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By pat4005
      A tiny UDF that can shoot magic packets at your computers to wake them the heck up. All credits to Olish.
      The only parameter it needs to be specified – is your machine's MAC-address (ip address (the second parameter), at which you will be sending magic packet is generating automatically from @IPAddress1 macro)
      Example:
      _WoL_WakeDevice('001CC0CAED7A') ; the second parameter (if necessery) must be a broadcast address of your local network segment (i.e. 192.168.0.255 for a network 192.168.0.0)  
      _WakeOnLan.au3
    • By water
      Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API.
      There are other UDFs available to automate Outlook:
      OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more.  Theads: Development - General Help & Support - Example Scripts - Wiki
      BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort

      KNOWN BUGS (last changed: 2020-02-09)
      None
    • By MrCreatoR
      This UDF allows to create formatted label using pseudo element RichLabel (RichEdit actually). Formating is set by using special modificator similar to <font> tag in Html.
      Notes: This UDF is a transformation-continuation of related UDF


      Example:
      Download:
      GUIRichLabel_1.2.zip
      Small syntax related fix: GUIRichLabel_1.1.zip
      GUIRichLabel_1.1.zip
       
      History version:
    • By PoojaKrishna
      Hi,
      I am trying to print items from Outlook in a Citrix machine. I am printing the items into PDF files using ‘Microsoft Print to PDF option’. I am using OutlookEX.au3 for printing items.
      Everything is working fine except handling the ‘Save Print Output As’ dialog appearing while trying to print the file to PDF.
      I have set the default printer to ‘Microsoft Print to PDF’ from the control panel ( Control Panel\All Control Panel Items\Devices and Printers) and using the following method to print the item.
      _OL_ItemPrint($oOutlook, $OL_Item) ;print item I am not able to handle the ‘Save Print Output As’ dialog initiated by the print statement in the Citrix machine. The WinActive method always returns false. I have tried with ControlSetText, ControlClick and Send methods also.
      Can anyone please help?
      Func _SavePDF($sFilePath) WinActivate ( "Save Print Output As", "") WinWaitActive ( "Save Print Output As", "",5 ) If WinActive("Save Print Output As") Then sleep(500) Send($sFilePath) sleep(500) Send("{ENTER}") sleep(500) EndIf EndFunc;=>_SavePDF  
    • By Stormgrade
      Hello,
      I'm searching the UDF GDIpProgress.au3 from ProgAndy
      None of the links in topic
       works
      Can't someone upload it please ?
×
×
  • Create New...