Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

Recommended Posts

When you create an item using _OL_ItemCreate the function returns the object of the newly created item.
Simply pass this object to _OL_itemModify and use property "Body" to set the text.
All available properties for a task can be found here when you select "Properties" in the left pane.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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...

@water  OK thanks for that.  

>> When you create an item using _OL_ItemCreate the function returns the object of the newly created item.
>> Simply pass this object to _OL_itemModify

OK, that clarifies what to pass to _OL_ItemModify as the $oOL parameter.

Quote

and use property "Body" to set the text.

All available properties for a task can be found here when you select "Properties" in the left pane.

That clarifies what to pass to _OL_ItemModify as the $sP1 parameter.

But what should I pass to _OL_ItemModify as the $vItem parameter?  It is described as that, "EntryID or object of the item."  Is this the object returned by _OL_FolderAccess()?

Link to comment
Share on other sites

Please check the help file that comes with the UDF. It explains each function and how to use the parameters.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

OK I'm back.  I'm now able to create a new blank task with _OL_ItemCreate(), and add text to its body with _OL_ItemModify().  But to the body I'd like to now insert a bullet point (screenshot).  Is there a way to do this with _OL_ItemModify(), or another OutlookEX function?  Or would I have to use core AutoIt to find the appropriate 'insert bullet point' control and click it?

To enter a bullet point manually, in the body I type '*' followed by a space, and a bullet point is then automatically inserted.  But when I pass that text to _OL_ItemModify(), only `* ` is inserted--the bullet point is not created.

Thanks.

 

 

 

Link to comment
Share on other sites

The Body-Property only supports simple text. The HTML-Property is not available for the task object. This means you have to use the Word Editor to set bullet points.
An example can be found in the _OL_ItemCreate.au3 script.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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...

@water Sorry, I'm back with a related question about the Word editor. Per the example in `_OL_ItemCreate.au3`, my AutoIt program switches to the Word editor, using the line

Global $oDoc = $oItem.GetInspector.WordEditor ; Get the Microsoft Word Document Object Model

Is there a way to 'undo' this switch-to-Word-editor change?  Here is the full code.

The reason I ask is because immediately after I ran my AutoIt program, the bullet points inserted into Outlook began to be styled and formatted differently than usual--in a way that is undesirable.  These changes appear to be permanent (at least, I can't figure out how to revert them).  Here are some of the specific changes that have occurred.

  • Usually the bullet point at each indentation level is a different style (screenshot). But now, each of those is the same style (screenshot).
  • The horizontal space between each indentation level is now smaller.
  • There are other ways the bullet points behave that are now different, and undesirable.

These differences are now present in any new Outlook task I create, and even after the AutoIt program stops and I reboot my computer. 

Thanks.

 

Edited by cag8f
Link to comment
Share on other sites

I have no idea why a script should change a global setting by just using bullet points. I haven't worked with lists and AutoIt yet.

Maybe you should use the ApplyListTemplate method?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

OK thanks for the reply.  I had another look today, and the issue seems to be resolved, through no direct action of my own.  I can promise though that yesterday I did indeed test the issue after closing AutoIt and reboooting, and it was still present.  Anyway, I acknowledge that I could have made some error during my observations.  I'm glad it's resolved.

>> Maybe you should use the ApplyListTemplate method?

In case this issue returns, that's a good idea--thanks!

Link to comment
Share on other sites

OK I'm back.  This time with a question about the ListGalleries object.  I've defined a range, and am now trying to execute ListGalleries('wdBulletGallery') to return a single ListGallery object, with this line:

ConsoleWrite($oRange.ListGalleries('wdBulletGallery') & @CRLF)

But that seems to be printing a blank value.  Shouldn't that print an object to the console?

The eventual goal of this exercise is to change the template applied to the list format.

My full code is below.

___

My Full Code

 

#include <OutlookEX\OutlookEX.au3>

Global $oOL = _OL_Open(); Open an Outlook object.

Global $oItem = _OL_ItemCreate($oOL, 3); Creates a blank task.  The integer 3 represents a task item.
Global $text = "Here is some text"

_OL_ItemModify($oOL, $oItem, Default, "Body=" & $text) ; Add a custom string to the body of the newly created task.

Global $oDoc = $oItem.GetInspector.WordEditor ; Get the Microsoft Word Document Object Model
Global $oRange = $oDoc.Range ; Get the range object

$oRange.Collapse(1) ; Move the range start/end to the start of the document
$oRange.MoveStart(2, 2)

ConsoleWrite('wdBulletGallery is:' & @CRLF)
ConsoleWrite($oRange.ListGalleries('wdBulletGallery') & @CRLF)

_OL_Close($oOL)

 

Link to comment
Share on other sites

wdBulletGallery is an enumeration as defined here.

So you need to replace 'wdBulletGallery' with the corresponding numeric value.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

On 11/19/2020 at 4:55 PM, cag8f said:

to return a single ListGallery object, with this line:

ConsoleWrite($oRange.ListGalleries('wdBulletGallery') & @CRLF)

But that seems to be printing a blank value.  Shouldn't that print an object to the console?

No, as objects can't be printed to the Console.

Here you get an example (written in VB) how to apply a Listtemplate to a range.
Untested translation to AutoIt:

Global Const $wdBulletGallery = 1 ; Bulleted list
$oGalleries = $oDoc.Application.ListGalleries($wdBulletGallery) ; Returns a collection of Galleries
$oBulletGallery = $oGalleries.ListTemplates(3)
$oRange.ListFormat.ApplyListTemplate($oBulletGallery)


 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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...
  • 2 weeks later...

Version 1.6.3.0 has been released!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

  • 4 weeks later...

hallo,

the udf is great, but I have a problem with the dateformat.

When I used the function ItemFind  and filter by

[start] > ‘2021-01-04 00:00’ ,

I get all Appointments since 1 April and not since 4. Jan. 

When I used [start] > 2020-12-26 00:00 I get all since 26. Dez.

When I create an Appointment I used the dateformat YYYY-MM-DD and everything  is fine.

I’m confused. My Country code of the PC is German.

Link to comment
Share on other sites

We get a lot of problems from the different date/time formats and conversion to the needed format.
Can you please test the following format "DD-MM-YYYY HH:MM"?

Seems to works as described here.

Edited by water
Corrected the date/time format to DD-MM-YYYY

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

Hello Water,

this is what i done... when i filter with "[start] > ‘2021-01-04 00:00’ " . I like to get all Appointments since 4 Jan 2021.

Is it a individuell Problem (Outlook / Office / Win/ confuguration ) and why is this Format function on _OL_ItemCreate and not with _OL_ItemFind?

 

 

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...