Function Reference

_OL_BarShortcutAdd

Adds a shortcut to a group in the OutlookBar.

#Include <OutlookEX_GUI.au3>
_OL_BarShortcutAdd($oOL, $vGroupname, $sShortcutname, $sTarget[, $iPosition = 1[, $sIcon = ""]])

 

Parameters

$oOL Outlook object returned by a preceding call to _OL_Open()
$vGroupname Name or 1-based index value of the group where the shortcut will be created
$oShortcutname Name of the shortcut to be created
$sTarget Target of the shortcut being created. Can be an Outlook folder, filesystem folder, filesystem path or URL
$iPosition [optional] Position at which the new shortcut will be inserted in the group (default = 0 = first shortcut in an empty group)
$sIcon [optional] The path of the icon file e.g. C:\temp\sample.ico (default = no icon)

 

Return Value

Success: 1
Failure: Returns 0 and sets @error:
    1 - Error accessing the group specified by $vGroupname. For details please see @extended
    2 - Error creating the shortcut. For details please see @extended
    3 - Specified icon file could not be found
    4 - Error setting the icon for the created shortcut. For details please see @extended

 

Remarks

Specify $iPosition = 1 to position a shortcut at the top of a non empty group

 

Related