Jump to content
Sign in to follow this  
water

OutlookEX UDF - Help & Support

Recommended Posts

Hi Syed,

maybe it was my fault! The _OL_Wrapper_MailSend script changed the order of parameters to mimic the _OutlookSendMail function of wooltowns UDF.

I tested the following script with Windows 7 and Outlook 2010 and it works when Outlook is up and running or when Outlook doesn't run.

This script has to be saved to the same directory where the _OL_Wrapper_MailSend.au3 is located!

So could you please give it a try and post the results?

#include <OutlookEX.au3>
$iOL_Debug = 2
Global $oOutlook = _OL_OpenEx()
Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name
_OL_Wrapper_MailSend($oOutlook, $sCurrentUser, "", "", "TestSubject", "Body<br><b>bold</b> normal.", @ScriptDir & "\_OL_Wrapper_MailSend.au3", $olFormatHTML, $olImportanceHigh)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended)
MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")

Func _OL_OpenEx($fOL_WarningClick = False, $sOL_WarningProgram = "", $iOL_WinCheckTime = 1000, $iOL_CtrlCheckTime = 1000)

    If Not IsBool($fOL_WarningClick) Then Return SetError(3, 0, 0)
    If Not IsInt($iOL_WinCheckTime) Then Return SetError(4, 0, 0)
    If Not IsInt($iOL_CtrlCheckTime) Then Return SetError(7, 0, 0)
    If $fOL_WarningClick Then
        If $sOL_WarningProgram = "" Then $sOL_WarningProgram = @ScriptDir & "\_OL_Warnings.exe"
        If Not FileExists($sOL_WarningProgram) Then Return SetError(1, 0, 0)
        Run($sOL_WarningProgram & " " & @AutoItPID & " " & $iOL_WinCheckTime & " " & $iOL_CtrlCheckTime, "", @SW_HIDE)
        If @error <> 0 Then Return SetError(6, @error, 0)
    EndIf
    If ProcessExists("Outlook.exe") > 0 Then $fOL_AlreadyRunning = True
    Local $oOL = ObjCreate("Outlook.Application")
    If @error <> 0 Or Not IsObj($oOL) Then Return SetError(1, @error, 0)
    ; A COM error handler will be initialised only if one does not exist
    If ObjEvent("AutoIt.Error") = "" Then
        $oOL_Error = ObjEvent("AutoIt.Error", "_OL_Error") ; Creates a custom error handler
        If @error <> 0 Then Return SetError(2, @error, 0)
    EndIf
    ; Logon to the default profile if Outlook wasn't already running
    If $fOL_AlreadyRunning = False Then
        Local $oOL_Namespace = $oOL.GetNamespace("MAPI")
        $oOL_Namespace.Logon($oOL.DefaultProfileName, "", False, False)
        If @error <> 0 Then Return SetError(8, @error, 0)
    EndIf
    Return $oOL

EndFunc   ;==>_OL_Open
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

Hi Syed,

maybe it was my fault! The _OL_Wrapper_MailSend script changed the order of parameters to mimic the _OutlookSendMail function of wooltowns UDF.

I tested the following script with Windows 7 and Outlook 2010 and it works when Outlook is up and running or when Outlook doesn't run.

This script has to be saved to the same directory where the _OL_Wrapper_MailSend.au3 is located!

So could you please give it a try and post the results?

#include <OutlookEX.au3>
$iOL_Debug = 2
Global $oOutlook = _OL_OpenEx()
Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name
_OL_Wrapper_MailSend($oOutlook, $sCurrentUser, "", "", "TestSubject", "Body<br><b>bold</b> normal.", @ScriptDir & "\_OL_Wrapper_MailSend.au3", $olFormatHTML, $olImportanceHigh)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended)
MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")

Func _OL_OpenEx($fOL_WarningClick = False, $sOL_WarningProgram = "", $iOL_WinCheckTime = 1000, $iOL_CtrlCheckTime = 1000)

    If Not IsBool($fOL_WarningClick) Then Return SetError(3, 0, 0)
    If Not IsInt($iOL_WinCheckTime) Then Return SetError(4, 0, 0)
    If Not IsInt($iOL_CtrlCheckTime) Then Return SetError(7, 0, 0)
    If $fOL_WarningClick Then
        If $sOL_WarningProgram = "" Then $sOL_WarningProgram = @ScriptDir & "\_OL_Warnings.exe"
        If Not FileExists($sOL_WarningProgram) Then Return SetError(1, 0, 0)
        Run($sOL_WarningProgram & " " & @AutoItPID & " " & $iOL_WinCheckTime & " " & $iOL_CtrlCheckTime, "", @SW_HIDE)
        If @error <> 0 Then Return SetError(6, @error, 0)
    EndIf
    If ProcessExists("Outlook.exe") > 0 Then $fOL_AlreadyRunning = True
    Local $oOL = ObjCreate("Outlook.Application")
    If @error <> 0 Or Not IsObj($oOL) Then Return SetError(1, @error, 0)
    ; A COM error handler will be initialised only if one does not exist
    If ObjEvent("AutoIt.Error") = "" Then
        $oOL_Error = ObjEvent("AutoIt.Error", "_OL_Error") ; Creates a custom error handler
        If @error <> 0 Then Return SetError(2, @error, 0)
    EndIf
    ; Logon to the default profile if Outlook wasn't already running
    If $fOL_AlreadyRunning = False Then
        Local $oOL_Namespace = $oOL.GetNamespace("MAPI")
        $oOL_Namespace.Logon($oOL.DefaultProfileName, "", False, False)
        If @error <> 0 Then Return SetError(8, @error, 0)
    EndIf
    Return $oOL

EndFunc   ;==>_OL_Open

i got confused! i have a _OL_Wrapper_MailSend.au3 in my c:\program files\autoit\include folder. In that location do i need to copy this script? in what name do i need to do it? then do i need to use the same example script to test?

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Share this post


Link to post
Share on other sites

i got confused! i have a _OL_Wrapper_MailSend.au3 in my c:\program files\autoit\include folder. In that location do i need to copy this script? in what name do i need to do it? then do i need to use the same example script to test?

You can save my test script as e.g. test.au3 in any directory you like. To remove all dependencies please replace
@ScriptDir & "\_OL_Wrapper_MailSend.au3"
with

""

We want to test if you can send a mail and therefore the attachment isn't needed.

In a next step we can try it with an attachment.


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

Hi Water,

Maybe you can help with this. I have created a custom email message field and would like to update it.

But it doesnt work if the field is empty. If it is not empty i can easily enter new value. Here is the code:

const $olFolderCalendar=9
const $olFolderContacts=10
const $olFolderDeletedItems=3
const $olFolderDrafts=16
const $olFolderInbox=6
const $olFolderJournal=11
const $olFolderJunk=23
const $olFolderNotes=12
const $olFolderOutbox=4
const $olFolderSentMail=5
const $olFolderTasks=13
const $olPublicFoldersAllPublicFolders=18
const $olFolderConflicts=19
const $olFolderLocalFailures=21
const $olFolderServerFailures=22
const $olFolderSyncIssues=20
Local $text,$text2,$myItem,$myItem1,$oOApp,$myNamespace,$myFolder

$oOApp = ObjCreate("Outlook.Application")
$myNamespace =$oOApp.GetNamespace("MAPI")
$myFolder = $myNamespace.GetDefaultFolder($olFolderOutbox)
$myItem = $myFolder.Items().Count
If Not $myItem = 0 then Sleep(10000)
$myFolder = $myNamespace.GetDefaultFolder($olFolderSentMail)
$myItem = $myFolder.Items().Count
$myItem1 = $myFolder.Items($myItem)
$objFields = $myItem1.Fields
$objFields.Item("SLA").Value = "Test Value"
$objMessage.Update

Share this post


Link to post
Share on other sites

You can save my test script as e.g. test.au3 in any directory you like. To remove all dependencies please replace

@ScriptDir & "\_OL_Wrapper_MailSend.au3"
with

""

We want to test if you can send a mail and therefore the attachment isn't needed.

In a next step we can try it with an attachment.

HI Water,

I tested this example script on both XP and Windows 7 machines with Office 2007 and 2010.Both were working fine. I have given a try with attachment and without attachment! it's working fine! Thanks a lot Water! :) :)


Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Share this post


Link to post
Share on other sites

Hi Juvigy,

I will have a look at it as soon as I have access to my PC again - maybe on saturday.


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

Hi Juvigy,

If you have added a UserProperty to an email item then you update the value of such a UserProperty using the following code:

$myItem1.userproperties.item("SLA").value = "Test Value"
$myItem1.Save

I couldn't find the collection "Fields" nor the method "Update" in the Outlook Object Model. Is this VBA code?

If you have to check for the existance of a UserProperty in advance then you could use something like:

$oUserProperty = $oItem.UserProperties.Find("SLA")
If IsObj($oUserProperty) Then
    $oItem.UserProperties.Item("SLA").value = "Test Value"
    $oItem.Save
EndIf
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

Hi Water,

It doesnt work for me.I get object errors.

I tried:

ConsoleWrite("Value:"&$objMessage.Subject&@CRLF) ;check if i got the correct msg
$objMessage.userproperties.Add("SLA",3,TRUE,1)
$objMessage.userproperties.item("SLA").value = 15 
$objMessage.Save

It all failed.The message i am working on is already created and saved (received mail moved to a folder)

and i would like to add a new field/row to it called 'SLA'.

What worked for me partially was using CDO and the .fields collection:

http://msdn.microsoft.com/en-us/library/ms526701%28v=EXCHG.10%29.aspx

But the problem is as i stated above that the 'SLA' field has to have some value - then i can update it.

If it has no value - nothing happens and i dont receive error too

@Edit. Got IT. I think it is because i am mixing the CDO and the Outlook object models/properties in my code.When i changed all to a Outlook only object models it works.I think It wasnt working before as i was getting the mail item via the CDO GetLast() function.

Edited by Juvigy

Share this post


Link to post
Share on other sites

Glad it works now!

Is there something of this stuff you would like to see in the OutlookEX UDF?


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

Glad it works now!

Is there something of this stuff you would like to see in the OutlookEX UDF?

I think it is not needed but i would very much like to see a general and unified time difference function.

As in outlook time is displayed according to the regional settings and there you can modify the format to be

almost anything there should be some way to convert it to a unified format and then time difference easily.

Tue 3/29/2011 9:38 AM
вт 29.3.2011 12:50

Those are only 2 of the many formats that can the sent field has.

Any idea how i can calculate time difference in minutes ? And not for those particular format but for all available combinations.

Share this post


Link to post
Share on other sites

... but i would very much like to see a general and unified time difference function.

As in outlook time is displayed according to the regional settings and there you can modify the format to be

almost anything there should be some way to convert it to a unified format and then time difference easily.

Tue 3/29/2011 9:38 AM
вт 29.3.2011 12:50

Those are only 2 of the many formats that can the sent field has.

Any idea how i can calculate time difference in minutes ? And not for those particular format but for all available combinations.

If the builtin Date UDF doesn't provide a function then I would search the forum. If you can't find a solution there then I would start a new thread. 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

Water, excuseme for the question out of this theme, but I would like to know if it is possible to detect Outlook language. I have users that has configured their Outlook client in english, others in french and others in spanish and I need to know the language to adapt my script when I have to request information.

Thanks a lot and regards.

Hi jcpetu,

the following code will give you the languageID depending on the setting of the MsoAppLanguageID Enumeration (1 - Install language, 2 - User interface language, 3 - Help language, 4 - Execution mode language, 5 - User interface language used prior to the current user interface language)

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
$oLanguage = $oOutlook.languageSettings
ConsoleWrite($oLanguage.languageID(1) & @CRLF)
_OL_Close($oOutlook)

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

Hi jcpetu,

the following code will give you the languageID depending on the setting of the MsoAppLanguageID Enumeration (1 - Install language, 2 - User interface language, 3 - Help language, 4 - Execution mode language, 5 - User interface language used prior to the current user interface language)

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
$oLanguage = $oOutlook.languageSettings
ConsoleWrite($oLanguage.languageID(1) & @CRLF)
_OL_Close($oOutlook)

Thanks a lot Water. By the way I attached the language codes link in case somebody may need it.

http://technet.microsoft.com/en-us/library/aa997435.aspx

Share this post


Link to post
Share on other sites

Hi Water,

I am so sad to disturb you again for the same reason. The fix whatever you have provided is working in some machines not all the machines. I am getting the same kind of error messages. for your reference i have attached the Outlookex.au3 UDF and example script please have a look.

Edited by Syed23

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Share this post


Link to post
Share on other sites

Here is the OutlookEX.au3 UDF and the example script is added below.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_icon=..\..\..\Program Files (x86)\AutoIt3\Aut2Exe\Icons\sitemap.ico

#AutoIt3Wrapper_UseX64=n

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <OutlookEX.au3>

$iOL_Debug = 2

Global $oOutlook = _OL_OpenEx()

Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name

_OL_Wrapper_MailSend($oOutlook, $sCurrentUser, "", "", "TestSubject", "Body<br><b>bold</b> normal.", "", $olFormatHTML, $olImportanceHigh)

If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_MailSend Example Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended)

MsgBox(64, "OutlookEX UDF: _OL_MailSend Example Script", "Mail successfully sent to user '" & $sCurrentUser & "'!")

Func _OL_OpenEx($fOL_WarningClick = False, $sOL_WarningProgram = "", $iOL_WinCheckTime = 1000, $iOL_CtrlCheckTime = 1000)

If Not IsBool($fOL_WarningClick) Then Return SetError(3, 0, 0)

If Not IsInt($iOL_WinCheckTime) Then Return SetError(4, 0, 0)

If Not IsInt($iOL_CtrlCheckTime) Then Return SetError(7, 0, 0)

If $fOL_WarningClick Then

If $sOL_WarningProgram = "" Then $sOL_WarningProgram = @ScriptDir & "\_OL_Warnings.exe"

If Not FileExists($sOL_WarningProgram) Then Return SetError(1, 0, 0)

Run($sOL_WarningProgram & " " & @AutoItPID & " " & $iOL_WinCheckTime & " " & $iOL_CtrlCheckTime, "", @SW_HIDE)

If @error <> 0 Then Return SetError(6, @error, 0)

EndIf

If ProcessExists("Outlook.exe") > 0 Then $fOL_AlreadyRunning = True

Local $oOL = ObjCreate("Outlook.Application")

If @error <> 0 Or Not IsObj($oOL) Then Return SetError(1, @error, 0)

; A COM error handler will be initialised only if one does not exist

If ObjEvent("AutoIt.Error") = "" Then

$oOL_Error = ObjEvent("AutoIt.Error", "_OL_Error") ; Creates a custom error handler

If @error <> 0 Then Return SetError(2, @error, 0)

EndIf

; Logon to the default profile if Outlook wasn't already running

If $fOL_AlreadyRunning = False Then

Local $oOL_Namespace = $oOL.GetNamespace("MAPI")

$oOL_Namespace.Logon($oOL.DefaultProfileName, "", False, False)

If @error <> 0 Then Return SetError(8, @error, 0)

EndIf

Return $oOL

EndFunc ;==>_OL_Open

Edited by Syed23

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Share this post


Link to post
Share on other sites

Hi Syed,

I suspect that you're using all kind of Outlook versions. Here is the latest version of _OL_Open. It works with older Outlook versions (< Outlook 2007) as well.

Func _OL_Open($fOL_WarningClick = False, $sOL_WarningProgram = "", $iOL_WinCheckTime = 1000, $iOL_CtrlCheckTime = 1000)

    If Not IsBool($fOL_WarningClick) Then Return SetError(3, 0, 0)
    If Not IsInt($iOL_WinCheckTime) Then Return SetError(4, 0, 0)
    If Not IsInt($iOL_CtrlCheckTime) Then Return SetError(7, 0, 0)
    If $fOL_WarningClick Then
        If $sOL_WarningProgram = "" Then $sOL_WarningProgram = @ScriptDir & "\_OL_Warnings.exe"
        If Not FileExists($sOL_WarningProgram) Then Return SetError(1, 0, 0)
        Run($sOL_WarningProgram & " " & @AutoItPID & " " & $iOL_WinCheckTime & " " & $iOL_CtrlCheckTime, "", @SW_HIDE)
        If @error <> 0 Then Return SetError(6, @error, 0)
    EndIf
    If ProcessExists("Outlook.exe") > 0 Then $fOL_AlreadyRunning = True
    Local $oOL = ObjCreate("Outlook.Application")
    If @error <> 0 Or Not IsObj($oOL) Then Return SetError(1, @error, 0)
    ; A COM error handler will be initialised only if one does not exist
    If ObjEvent("AutoIt.Error") = "" Then
        $oOL_Error = ObjEvent("AutoIt.Error", "_OL_Error") ; Creates a custom error handler
        If @error <> 0 Then Return SetError(2, @error, 0)
    EndIf
    Local $aVersion = StringSplit($oOL.Version, '.')
    ; Logon to the default profile if Outlook wasn't already running (for Outlook 2007 and later)
    If $fOL_AlreadyRunning = False and Int($aVersion[1]) >= 12 Then
        Local $oOL_Namespace = $oOL.GetNamespace("MAPI")
        $oOL_Namespace.Logon($oOL.DefaultProfileName, "", False, False)
        If @error <> 0 Then Return SetError(8, @error, 0)
    EndIf
    Return $oOL

EndFunc   ;==>_OL_Open

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

Hi Water,

first of all awesome work.

But I have a small question (I hope so).

I am already using your UDFs for a while but there is one thing I really miss in creating an appointment.

When creating a new appointment i want to specify the "Label".

Since I only have a German Version of Outlook I don't know the name of that field.

This is the field where you can specify for example the color of that appointment.

Also you can give these colours names but you only have a limited number of colours. 0 to 10 I guess.

I hope you know what I mean.

If you could look into this issue I would be most greatful since I already tried to figure this out but I failed so far. :-(

I am using Outlook 2003 Standard Edition on a Windows XP SVP3 System and the "old" outlook.au3 -> Function _OutlookCreateAppointment()

Thanks.

Regards

Supergrobi

Share this post


Link to post
Share on other sites

Hallo Supergrobi,

ich schreibe Dir auf englisch, damit uns die anderen auch verstehen :)

I think it's a property of the appointment item (category if I rembember correctly). I'm not at my windows PC at the moment. I will post a solution as soon as I can get my hands on my machine.


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

Hi Water,

great thanks for your help :P

Maybe as a hint: I mean the field "Beschriftung". :)

My guess was category Item as well but so far it didn't work out.

I guess that first of all you have to read the values out of outlook and then set

the appropiate value. But this is only a guess. :)

Share this post


Link to post
Share on other sites

Hi Supergrobi,

at the moment I'm not at my Windows PC. I had to take a day off because of the beautiful weather :)

I think I know what you mean. There are categories which you can assign colors. I will create a function to extract the categories and one to set them.

I will post what I have as soon as I find some spare time.


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.
Sign in to follow this  

×
×
  • Create New...