Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

Recommended Posts

7 hours ago, water said:

The returned array holds the reccurence object in element 14.

Objects can't be displayed using  _Arraydisplay.
Did you read the MS documentation I linked you to? If not, please do so now and you will see how to proceed.

And btw:

16 hours ago, water said:

Add some error checking to your script for easy debugging!

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

i think the issue is how the date is formatted?  i tried multiple formats but get an error with .GetOccurrence

;~      $date = "#1/23/2024 8:00:00 AM#"
;~      $date = "#1/23/2024#"
;~      $date = "1/23/2024 8:00:00 AM"
        $date = "1/23/2024"

        $prop = _OL_ItemRecurrenceGet($oOutlook, $entry_id)

        If @error Then
            MsgBox($msg_error, $script_name, "Unable to retrive Recurrence information.")
            Exit
        EndIf
        MsgBox(0, "",$prop)

        $occurence = $prop[14]
        $occurence = $occurence.GetOccurrence($date)

        If @error Then
            MsgBox($msg_error, $script_name, "Unable to determine if Meeting is recurring on specified date.")
            Exit
        EndIf

        MsgBox(0, "",$subject)
        MsgBox(0, "",$occurence)

 

Link to comment
Share on other sites

Here you'll find some information about dates: https://www.autoitscript.com/wiki/OutlookEX_UDF_-_Find_Items

I suggest something like "2011-02-21 08:00". Note that there no seconds in the timestamp.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I have tested with multiple meetings and seeing same results.

for example, the meeting below is a recurring meeting

 uknl6o37cjgS.jpg?o=1

@error is being triggered no matter which date or date format i use.  i am also seeing this COM error

ScriptLine: 90   Description:You changed one of the recurrences of this item, and this instance no longer exists. Close any open items and try again.

ultimately i would like to plugin today's date to see if the recurring meeting is occuring today

;~      $date = "2024-07-05 09:00"
        $date = "2024-07-05"
;~      $date = "2023-09-11"

        $prop = _OL_ItemRecurrenceGet($oOutlook, $entry_id)

        If @error Then
            MsgBox(0, "", "Unable to retrive Recurrence information.")
            Exit
        EndIf
;~      msgbox(0,"",$prop)

        $occurence = $prop[14]
        $start_date = $occurence.GetOccurrence($date)

        If @error Then
            MsgBox(0, "", "Unable to determine if Meeting is recurring on specified date.")
            Exit
        EndIf

        MsgBox(0,"",$subject)
        MsgBox(0,"",$start_date)

 

Link to comment
Share on other sites

In the MS documentation I see dates in VB examples written as e.g. #3/12/2003 3:30:00 PM#
This article describes how to use dates in VB.

I understand that today's date/time should be #11/10/2023 18:10# or #2023-11-10 18:10# 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

fiiiiinally figured it out!

this is the date format that works (without the #):

3/12/2003 3:30:00 PM

the hang up with with the @error detection.  was always getting an error no matter how I formatted the date.  so instead you can detect if the meeting is happening on a particular day with IsObject

$item_details = _OL_ItemRecurrenceGet($oOutlook, $entry_id)

If @error Then
    MsgBox($msg_error, $script_name, "Unable to retrive Recurrence information.")
    _Exit()
EndIf

$oRecurrence = $item_details[14]
$mtg_occurs_today = $oRecurrence.GetOccurrence($date)

If IsObj($mtg_occurs_today) Then
    MsgBox(0, "", "Meeting occurs on date specified)
Else
    MsgBox(0, "", "Meeting does NOT occur on date specified)
EndIf

the time specified has to be exact, you can get the time from "Start" - since it is a recurring meeting the start time is always the same 

$aResult = _OL_ItemFind($oOutlook, "*\Calendar", $olAppointment, "", "", "", "Subject,Start,End,IsRecurring,EntryID", "", 2)

figured id share this in case someone came across the same issue

thanks for all your help water!

Edited by gcue
Link to comment
Share on other sites

Our company is rolling out a new version of Outlook.  Getting an error when running _OL_Open()

@error = 1
@extended = -2147221164

### COM Error !  Number: 80020006   ScriptLine: 670   Description:
### COM Error !  Number: 80040154   ScriptLine: 682   Description:

You have Microsoft Outlook Version 1.2023.1004.400 (Production)
Client Version is 20230922005.26

OutlookEX: 1.7.0.1 2022-08-21

Link to comment
Share on other sites

Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME)

Means: There is no local installation of Outlook accessible (for this user).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Can you check that the installed Outlook

  • comes with the required COM components. Please see the wiki.
  • I assume you installed with admin permissions. Is Outlook now available to all users?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

2 hours ago, water said:

Can you check that the installed Outlook

  • comes with the required COM components. Please see the wiki.
  • I assume you installed with admin permissions. Is Outlook now available to all users?

you are right.  i dont see the com component - this version of outlook is weird. doesnt show addins either so not sure where to even find where the com section either.  i dont have admin rights and this version of outlook is being piloted.  i can toggle new version to old version.  sticking with old version for now till they force us to use the new version :(

Link to comment
Share on other sites

  • 2 weeks later...

looks like our company isnt going to include the com component with our next version of outlook.  is there a separate install i could use - that only installs a com component? i see references online that say how to register it but not sure if that means installing it

Link to comment
Share on other sites

Never had to install Outlook myself.
But I would try to do a re-install and select the COM component as well.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 2 weeks later...

Have a strange issue that just started recently , when outlook opens when called from the UDF , the ribbon has an icon "All Apps" (see screenshot attached)

When I run outlook manually this ICON does not appear.

 

Any Ideas ?

 

Using UDF - OutlookEX: 1.7.0.0 2021-11-16

Using Office Pro Plus 2021

 

 

 

Screenshot 2023-12-08 101504.png

Link to comment
Share on other sites

Unfortunately I have no longer access to Outlook. But it seems to be a problem with Outlook settings.
I used Google to search for "outlook pro plus 2021 all apps ribbon suppress" and found:
https://techcommunity.microsoft.com/t5/outlook/remove-unnecessary-quot-all-apps-quot-button/m-p/3921421

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 1 month later...

Hi Water,

There is a typo at line 3748 in OutlookEX.au3

; Syntax.........: _OL_ItemRecurrenceExceptionSet($oOL, $vItem, $sStoreID, $sStartDate[, $sNewStartDate = ""[, $sNewEndDate = ""[, $sNewSubject = ""[, $sNewBody = ""]]]]

Replace with :

; Syntax.........: _OL_ItemRecurrenceExceptionSet($oOL, $vItem, $sStoreID, $sStartDate[, $sNewStartDate = ""[, $sNewEndDate = ""[, $sNewSubject = ""[, $sNewBody = ""]]]])

 

Link to comment
Share on other sites

Thanks, will be fixed with the next version :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 1 month later...

https://www.autoitscript.com/wiki/OutlookEX_UDF_-_Appointment_Item

I experienced this issue

From the wiki and documentation

_OL_Wrapper_CreateAppointment($oOutlook, "Test Appointment", $sStart, $sEnd, "My office", False, "Testbody", 15, $olBusy, $olImportanceHigh, $olPrivate, $olRecursWeekly, $sStart, _DateAdd("w", 3, $sEnd), 1)

The UDF example expressly lists this prototype:

_OL_Wrapper_CreateAppointment($oOL, $sSubject, $sStartDate[, $vEndDate = ""[, $sLocation = ""[, $bAllDayEvent = False[, $sBody = ""[, $sReminder = 15[, $sShowTimeAs = ""[, $iImportance = ""[, $iSensitivity = ""[, $iRecurrenceType = ""[, $sPatternStartDate = ""[, $sPatternEndDate = ""[, $iInterval = ""[, $iDayOfWeekMask = ""[, $iDay_MonthOfMonth_Year = ""[, $iInstance = ""]]]]]]]]]]]]]]])

 

However, 

Where $sEnd(date) is blank, using "" (double quotes) does not behave as expected. Similar using a blank "" (double quotes) for Location caused unwanted behaviour.

Using keyword Default fixed all problems

_OL_Wrapper_CreateAppointment($oOutlook, $OLm_Subject, $OLm_DatStart, Default, Default, Default, $sBody)

I could not find a caveat in the documentation stating keyword Default is to be used for default values. 

Have a nice day now

Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

I had a quick look at the code and noticed that the wrapper functions need a brush up in this area.
I will post updated code as soon as possible.

Unfortunately I no longer have access to Outlook and jhence can't test my code.
Would you mind to do the testing for me when the new code is ready?

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

×
×
  • Create New...