Jump to content
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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

:)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - 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 2019-10-24 - Version 1.4.14.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-11-30 - Version 1.4.0.0) - Download - General Help & Support - Example Scripts - Wiki
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 (NEW 2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By water
      Extensive library to control and manipulate Microsoft Outlook.
      Theads: Development - General Help & Support - Example Scripts - Wiki
      There is another UDF (OutlookTools) available (as a beta at the moment) to import/export contacts and events to VCF/ICS files.
      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: 2019-11-30)
      None
    • 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 ?
    • By water
      I just noticed that Outlook does not allow to import iCal events programmatically.
      I might implement some of the iCalendar data format (RFC 5545) if someone is interested
      Please post here or click the "Like" button if you think this is a good idea
      Edit: For download please see my signature
    • By ozymandius257
      This is probably a very simple question (I hope!)
      I'm looking to use a UDF to access a SQL database, and have found ADO.au3, but I can't seem to work out how to use it.
      I've copied the files ado.au3 and ado_constants.au3 into the folder C:\Program Files (x86)\AutoIt3\Include, then opened SciTe and started a new project.
      But when I type #include<AD - I don't get offered ADO.au3.
      (I know I should be using the folder C:\Program Files (x86)\AutoIt3\UserInclude, but when it didn't work from there, I tried the above).
      What am I doing wrong?
       
    • By BetaLeaf
      What is Rollbar?
      Rollbar provides real-time error alerting & debugging tools for developers. Learn more about it at https://rollbar.com/product/
      Demo: https://rollbar.com/demo/demo/
      Screenshot:
      Instructions: (RollbarTest.au3)
      ; Include RollbarSDK #include "RollbarSDK.au3" ;Turns on ConsoleWrite debugging override. ;Global $Rollbar_Debug=False ; Initialize RollbarSDK with the project's API key. ; Parameters ....: $__Rollbar_sToken - [Required] Go to https://rollbar.com/<User>/<ProjectName>/settings/access_tokens/ for your project. Use the token for post_server_item. _Rollbar_Init("eaa8464a4082eeabd9454465b8f0c0af") ; Write code that causes an error you want to catch, then call ; _Rollbar_Send ; Parameters ....: $__Rollbar_sErrorLevel - [Required] Must be one of the following values: Debug, Info, Warning, Error, Critical. ; $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_Send("Debug", "This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_Send("Warning", "This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_Send("Error", "This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_Send("Critical", "This is an critical message. If you received this, you were successful!", "Critical Message") _Rollbar_Send("Info", "This is a test message. If you received this, you were successful!") ;No Message ; Rollbar_Send's helper functions ; Parameters ....: $__Rollbar_sMessage - [Required] The message to be sent. This should contain any useful debugging info that will help you debug. ; $__Rollbar_sMessageSummary - [Optional] A string that will be used as the title of the Item occurrences will be grouped into. Max length 255 characters. If omitted, Rollbar will determine this on the backend. _Rollbar_SendDebug("This is an debug message. If you received this, you were successful!", "Debug Message") _Rollbar_SendInfo("This is a test message. If you received this, you were successful!", "Info Message") _Rollbar_SendWarning("This is an warning message. If you received this, you were successful!", "Warning Message") _Rollbar_SendError("This is an error message. If you received this, you were successful!", "Error Message") _Rollbar_SendCritical("This is an critical message. If you received this, you were successful!", "Critical Message") ; Usable Example Local $sImportantFile = "C:\NOTAREALFILE_1234554321.txt" Switch FileExists($sImportantFile) Case True MsgBox(0, "Example Script", "An important file was found. Continuing...") Case Else _Rollbar_SendCritical('An important file was missing. Halting... File: "' & $sImportantFile & '"', 'Important file "' & $sImportantFile & '" is missing.') EndSwitch Notes: Please comment your feedback, advice, & suggestions below. While this is only a proof of concept, I will expand its feature set for everyone to use. 
      Right now, it is fully functional but not tested in production.
       
       
      Changelog:
      RollbarSDK.au3
      RollbarTest.au3
      v0.2
       
      v0.1.1
       
×
×
  • Create New...