<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.autoitscript.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tjalve</id>
	<title>AutoIt Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.autoitscript.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tjalve"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/wiki/Special:Contributions/Tjalve"/>
	<updated>2026-04-21T21:16:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=OutlookEX_UDF_-_General&amp;diff=11496</id>
		<title>OutlookEX UDF - General</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=OutlookEX_UDF_-_General&amp;diff=11496"/>
		<updated>2012-12-19T15:33:57Z</updated>

		<summary type="html">&lt;p&gt;Tjalve: /* Wrapper functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
The OutlookEX UDF offers functions to control and manipulate Microsoft Outlook. This page describes the OutlookEX UDF in general.&lt;br /&gt;
== Concept ==&lt;br /&gt;
The OutlokEX UDF is based upon this concept:&lt;br /&gt;
&lt;br /&gt;
* Every item in Outlook is uniquely identified by EntryID and StoreID. The default StoreID is your inbox&lt;br /&gt;
* Every item has properties to describe the item (subject, startdate ..) and methods to act upon the item (move, delete …)&lt;br /&gt;
* It does not matter where an item is stored. You can access any folder and get/create/modify items there&lt;br /&gt;
* The search and action functions are now separated. As an example the user first searches for the items to be deleted and then calls the delete function&lt;br /&gt;
* The UDF was designed to be as modular as possible. E.g. there is a single function to create an item, be it a mail item, contact item or whatever&lt;br /&gt;
* The number of properties you can pass to most functions is not limited by the number of parameters defined for the function. Properties can be passed as parameters (up to 10) or in an unlimited array as parameter 1&lt;br /&gt;
* The UDF allows to access all kind of folders (see the following listing). Folders can be passed to a function by name or as an object&lt;br /&gt;
&lt;br /&gt;
The UDF contains two sets of functions:&lt;br /&gt;
* One to control and manipulate the items in an Exchange Store or PST archive&lt;br /&gt;
* One to control and manipulate the Outlook GUI&lt;br /&gt;
&lt;br /&gt;
== Folders ==&lt;br /&gt;
It does not matter where an item is stored. You can access any folder and get/create/modify items there.&lt;br /&gt;
&lt;br /&gt;
Folders you can access:&lt;br /&gt;
                                &lt;br /&gt;
{| style=&amp;quot;border: 1px solid darkgray&amp;quot; cellspacing=0 cellpadding=5px&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;border: 1px solid darkgray&amp;quot; | Syntax&lt;br /&gt;
! style=&amp;quot;border: 1px solid darkgray&amp;quot; | Folder you access&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;rootfolder\subfolder\...\subfolder&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | any public folder or any folder of the current user (replace rootfolder with * to access the root folder of your mailbox)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;\\firstname name&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | default folder of another user (class specified by $iOL_FolderType) (replace &amp;quot;firstname name&amp;quot; with &amp;quot;*&amp;quot; to access your mailbox)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;\\firstname name\\subfolder\...\subfolder&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | subfolder of the default folder of another user (class specified by $iOL_FolderType)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;\\firstname name\subfolder\..\subfolder&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | subfolder of another user&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | default folder of the current user (class specified by $iOL_FolderType)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | &amp;quot;\subfolder&amp;quot;&lt;br /&gt;
| style=&amp;quot;border: 1px solid darkgray&amp;quot; | subfolder of the default folder of the current user (class specified by $iOL_FolderType)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Supported Version ==&lt;br /&gt;
The OutlookEX UDF has been tested with Outlook 2002 on Windows XP SP3 and Outlook 2010 on Windows 7 SP1.&lt;br /&gt;
== Naming pattern ==&lt;br /&gt;
If a method can be used for more than one item type (e.g. mail, calendar and notes) the function is called _OL_ItemXXX else the function is called _OL_CalendarXXX&lt;br /&gt;
&lt;br /&gt;
== Outlook security ==&lt;br /&gt;
[[File:outlook_security_warning_1.gif|frame|alt=Outlook Security Warning|Outlook Security Warning]]&lt;br /&gt;
Some Outlook objects (address book, mail items ...) including their properties and methods are protected by security settings. &lt;br /&gt;
Accessing such objects makes the Outlook Object Model Guard present a popup warning like &amp;quot;a program is trying to access your Address book or Contacts&amp;quot; or &amp;quot;a program is trying to access e-mail addresses you have stored in Outlook...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A small function (&#039;&#039;_OL_Warnings.au3&#039;&#039;), which has to be compiled and run separately, clicks away all Outlook Security Warnings. Setting parameter &#039;&#039;$fOL_WarningClick&#039;&#039; to &#039;&#039;True&#039;&#039; when you call function &#039;&#039;_OL_Open()&#039;&#039; runs the &#039;&#039;_OL_Warnings.exe&#039;&#039;.&lt;br /&gt;
The &#039;&#039;_OL_Warnings.exe&#039;&#039; stays active and clicks away all warnings until the calling script is ended.&lt;br /&gt;
&lt;br /&gt;
It&#039;s written for an english language environment but can easily be adopted to other languages.&lt;br /&gt;
== Wrapper functions ==&lt;br /&gt;
To make transition from the original Outlook UDF to the new OutlookEX UDF a bit smoother, &#039;&#039;wrapper&#039;&#039; functions that mimic functions of the original UDF have been implemented in the new UDF.&lt;br /&gt;
Number and position of the parameters have been left untouched as far as possible. E.G. &#039;&#039;_OutlookSendMail&#039;&#039; of the original UDF has become &#039;&#039;_OL_Wrapper_SendMail&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;wrapper&#039;&#039; function names are prefixed with &#039;&#039;_OL_Wrapper_&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
However, the message does not apper if a valid Anti-Virus is installed.&lt;br /&gt;
&lt;br /&gt;
== Call a function ==&lt;br /&gt;
Some functions need to accept a lot of parameters when a user needs to set many properties of an item. Let&#039;s say you want to create a mail item and pass subject, bodyformat, body and importance to the _OL_ItemCreate function.&lt;br /&gt;
Most functions accept up to 10 properties as parameters or an unlimited number of properties as a zero based one-dimensional array.&lt;br /&gt;
&lt;br /&gt;
This two examples are equivalent:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
$oItem = _OL_ItemCreate($oOutlook, $olMailItem, &amp;quot;*\Outlook-UDF-Test\TargetFolder\Mail&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;Subject=TestMail&amp;quot;, &amp;quot;Importance=&amp;quot; &amp;amp; $olImportanceHigh, &amp;quot;BodyFormat=&amp;quot; &amp;amp; $olFormatHTML, _&lt;br /&gt;
         &amp;quot;HTMLBody=Bodytext in &amp;amp;lt;b&amp;gt;bold&amp;amp;lt;/b&amp;gt;&amp;lt;img src=&#039;cid:The_Outlook.jpg&#039;&amp;gt;Embedded image.&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
Global $aProperties[100] = [&amp;quot;Subject=TestMail&amp;quot;, &amp;quot;Importance=&amp;quot; &amp;amp; $olImportanceHigh, &amp;quot;BodyFormat=&amp;quot; &amp;amp; $olFormatHTML, &amp;quot;HTMLBody=Bodytext in &amp;amp;lt;b&amp;gt;bold&amp;amp;lt;/b&amp;gt;&amp;lt;img src=&#039;cid:The_Outlook.jpg&#039;&amp;gt;Embedded image.&amp;quot;]&lt;br /&gt;
$oItem = _OL_ItemCreate($oOutlook, $olMailItem, &amp;quot;*\Outlook-UDF-Test\TargetFolder\Mail&amp;quot;, &amp;quot;&amp;quot;, $aProperties)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Empty properties in the passed array are ignored.&lt;br /&gt;
&lt;br /&gt;
== Example Scripts ==&lt;br /&gt;
=== For single functions ===&lt;br /&gt;
Every function of the UDF comes with an example script (except internal functions). The example script is named like the function.&lt;br /&gt;
==== Test Environment ====&lt;br /&gt;
Every example script calls function _OL_TestEnvironment.au3. This function creates a test environment to make sure each function delivers a predictable result independant of the system it is running on and to make sure the Outlook environment of the user is left untouched.&amp;lt;br&amp;gt;&lt;br /&gt;
The test environment is created as folder &amp;quot;Outlook-UDF-Test&amp;quot; plus subfolders and multiple items in your mailbox. This folders and items are manipulated by the example scripts.&amp;lt;br&amp;gt;&lt;br /&gt;
_OL_TestEnvironment.au3 can directly be called by the user. It then displays a GUI where the user can save some settings for the example scripts or create and delete the test environment manually.&amp;lt;br&amp;gt;The test environment is created by every example script but is not deleted after the script has ended. To remove the test environment run _OL_TestEnvironment.au3 and delete the test environment manually.&lt;br /&gt;
&lt;br /&gt;
=== Extended Examples ===&lt;br /&gt;
Example scripts which describe more than a single function of the UDF are prefixed with &#039;&#039;_OL_Example_&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Function specific pages ==&lt;br /&gt;
The following pages contain information for the functions that can be used for may different item types.&lt;br /&gt;
=== Find an Item ===&lt;br /&gt;
Further information on how to find items: [[OutlookEX UDF - Find Items]]&lt;br /&gt;
=== Forward an Item ===&lt;br /&gt;
Further information on how to forward items: [[OutlookEX UDF - Forward Items]]&lt;br /&gt;
&lt;br /&gt;
== Item specific pages ==&lt;br /&gt;
The following pages contain information for each of the Outlook item types supported by the OutlookEX UDF.&lt;br /&gt;
=== Appointment Item ===&lt;br /&gt;
Further information about wrapper functions plus tips &amp;amp; tricks for appointment items: [[OutlookEX UDF - Appointment Item]]&lt;br /&gt;
=== Mail Item ===&lt;br /&gt;
Further information about wrapper functions plus tips &amp;amp; tricks for mail items: [[OutlookEX UDF - Mail Item]]&lt;br /&gt;
=== Meeting Item ===&lt;br /&gt;
Further information about wrapper functions plus tips &amp;amp; tricks for meeting items: [[OutlookEX UDF - Meeting Item]]&lt;/div&gt;</summary>
		<author><name>Tjalve</name></author>
	</entry>
</feed>