Recurring icon for custom form task item

Status
Not open for further replies.

mcwiciu

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hello! Greetings :)

I need help!

I've created a custom task form (IPM.Task.Zadanie) from default task form (IPM.Task), changed icons in properties tab - large and small - to task icons found in Program Files\Microsoft Office\Office12\FORMS\1045 folder (TASKL.ICO and TASKS.ICO - i use Outlook 2007) and published custom form to personal form library. I made my new custom form for tasks (IPM.Task.Zadanie) default to my personal task folder. I also changed class of every task item in task folder to new one (IPM.Task.Zadanie).

Icons are displayed correctly with one exception - task items that are recurring task items should display task icon with two arrows in right bottom corner (this indicates that this item has recurrence). Now recurring items have the same icon like task items without recurrence (i know that i can add column to show recurrence but this doesn't solve the problem).

So my question is - how force Outlook to show recurring task items (with class IPM.Task.Zadanie) with icon that contains arrows (like default one).

Look forward for reply

Thx in advance
 
Hello again.

I made some progress but still its not what i really need.

I registered form region in windows registry, specified the message class, made xml schema:

<FormRegion xmlns="http://schemas.microsoft.com/office/outlook/12/formregion.xsd">
<formRegionType>replace</formRegionType>
<icons>
<default>c:\Form Regions\olkfst.ico</default>
<recurring>c:\Icons\recur.ico</recurring>
</icons>
</FormRegion>

Icon for custom class form (IPM.Task.Zadanie) tasks has changed, but is the same for non-recurring and recurring items. New icon (olkfst.ico) as specified in xml schema under <default> child element appear for all items without distinction between recurring and non-recurring items. For recurring items it should be recur.ico as specified in xml schema under <recurring> child element, but its not. It looks like there are no recurring tasks, but there is a lot of recurring tasks in my personal tasks folder. Only difference now is that the icon has changed, but without distinction between recurring and non-recurring items.

Any ideas?

Greetings and thx in advance.
 
Continued exploration ...

I finally got what I wanted, but it's a little bit freaky.

At first, i know what is the issue of problems.

I used DocMessageClass and changed class of items with matched option "Reset icons".

That changed Property PR_ICON_INDEX to -1 (it allows to display custom items but causes my problems). I used Outlook Spy to determine this. Property PR_ICON_INDEX is set to -1 also in items created via custom forms (with custom class - for ex. IPM.Task.zadanie).

To avoid that i created custom form IPM.Task.zadanie (i replaced first page of IPM.Task with form region - it looks almost like default one). I made it default for my task folder. Then i deleted custom form from library (but it is still default for my task folder. When I create new tasks - new tasks are IPM.Tasks.zadanie -> I registered form region in windows registry, specified the message class (IPM.Task.zadanie), made xml schema (previous post). Now when i create new item everythings works fine.

But there is one more thing and I need help.

I want to change my task items back to default PR_ICON_INDEX property (for ex. it is 1280 for non-recurring task items and 1281 for recurring). It is possible do that one by one with Outlook Spy but i've got many many task items. It is too much work and would take too much tiime i dont have.

I found macro, which change PR_ICON_INDEX property, but it doesn't change all selected items at once (only first one from selection). Macro code is (http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_26716151.html):

Sub ChangeIcon()
Const PR_ICON_INDEX = "http://schemas.microsoft.com/mapi/proptag/0x10800003"
Dim olkMsg As Outlook.MailItem, olkPA As Outlook.PropertyAccessor
Set olkMsg = Application.ActiveExplorer.Selection(1)
Set olkPA = olkMsg.PropertyAccessor
olkPA.SetProperty PR_ICON_INDEX, 0
olkMsg.Save
Set olkPA = Nothing
Set olkMsg = Nothing
End Sub

It works well, but I have to change each element separately (I even created button for macro but still too much clicking).

I am not a programmer so my request is:

help me change this macro code that it will change all items at once (when i select folder or items in folder - doesn't matter).

Thx in advance and greetings.
 
This: Set olkMsg = Application.ActiveExplorer.Selection(1) tells it to use the selected item. I have a generic macro to work with all items in any folder here - http://www.slipstick.com/developer/code-samples/working-items-folder-selected-items/
and merge your code into it. You'll need to replace obj with olkMsg then put your code within the for/next loop

For Each olkMsg In objItems
With olkMsg
Set olkPA = olkMsg.PropertyAccessor
olkPA.SetProperty PR_ICON_INDEX, 0
olkMsg.Save
end with
Next
 
I made sth like this but it doesn't seem to work (i got message box "invalid procedure code or argument")... (I replaced line "Dim obj As Object" with "Dim olkMsg As Object", then put code within the for/next loop and replaced "Set obj = Nothing" to "Set olkMsg = Nothing")

Public Sub PR_ICON_INDEX_change_many_items()
Dim objOL As Outlook.Application
Dim objItems As Outlook.Items
Dim objFolder As Outlook.MAPIFolder
Dim olkMsg As Object


Set objOL = Outlook.Application
Set objFolder = objOL.ActiveExplorer.CurrentFolder
Set objItems = objFolder.Items

For Each olkMsg In objItems
With olkMsg
Set olkPA = olkMsg.PropertyAccessor
olkPA.SetProperty PR_ICON_INDEX, 0
olkMsg.Save
End With
Next

Set olkMsg = Nothing
Set objItems = Nothing
Set objFolder = Nothing
Set objOL = Nothing
End Sub

As i said i am not programmer so it is too hard for me to create macro by myself. I would be grateful for advice. Thx
 
That's it!!!!!

It works!!!!!!!!!

You are GREAT!!!!!!!!!!!!!!!!!!

Thx thx thx!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S Outlook 2016 Understand and customize prepended behavior of recurring task Using Outlook 0
J Recurrence pattern blank on recurring meetings? Using Outlook 4
G Schedule recurring email and attachments display Outlook VBA and Custom Forms 3
V Outlook 2016 Multiple recurring tasks getting created Using Outlook 0
S Changing colors of today's appointments, but not recurring ones Using Outlook 33
G Recurring tasks break links Outlook 2016 Using Outlook 5
A Unable to save recurring Meeting to Documents folder due to error Using Outlook 2
K Recurring all day annual event Using Outlook 3
P Restore an individual all-day recurring event Using Outlook 2
F Year-and-a-day recurring appointments Using Outlook 1
P Receiving a Meeting Declined notice for a recurring meeting Using Outlook 0
N Recurring invite sent w/distribution list adding/removing attendees Using Outlook 0
C Recurring Task End Date Varies Using Outlook 3
M Expected behaviour of recurring appointments? Using Outlook 2
K Outlook 2013 Recurring Tasks Not Showing Complete Outlook.com Using Outlook.com accounts in Outlook 1
G how to cancel a recurring meeting but not the organizer but all attendees need to know. Using Outlook 1
L Recurring Tasks lost Using Outlook 3
Diane Poremsky Scheduling a Recurring Message Using Outlook 0
Diane Poremsky Scheduling a Recurring Message Using Outlook 0
L Who Deleted My Recurring Meeting? Exchange Server Administration 6
T outlook cal for mac changes times of recurring meetings on its own Using Outlook 1
F Recurring meeting with recurring prep. 2 days before Using Outlook 1
Mr Mayor Another recurring meeting question Using Outlook 1
J Recurring meeting - i require a monthly accept confrimation Using Outlook 1
T The Formatting Changes When A Recurring Appointment is Changed Using Outlook 1
S Modify recurring outlook invites based on form entry Using Outlook 0
S How to script for a recurring task Using Outlook 0
I VBA Recurring Task Converted From Email Using Outlook 2
M Recurring invitations for a recurring meeting Using Outlook 3
M outlook recurring item stucks me. :( Exchange Server Administration 1
M Email address included automatically in the recurring meeting Using Outlook 4
L Setting up recurring meeting for every thursday except 3rd thursday Using Outlook 3
M How to skip weekends on recurring appointments - OL2010? Using Outlook 4
D Priting only Recurring Appointments in Outlook Calendar 2010 Using Outlook 1
X Can you get outlook to ignore certain weeks for recurring meetings? Using Outlook 1
D Updating a recurring meeting cuses a reminder to be sent for every occurence. Using Outlook 2
B weekday recurring appointments Using Outlook 1
J Recurring Appointments With A Twist Using Outlook 3
P Delete Recurring Meeting Invite Using Outlook 4
A Recurring meeting sending a invite for each meeting Using Outlook 1
G Weekly recurring appointments based on 6 month rotation Using Outlook 2
D Recurring Tasks Problem? Using Outlook 5
B Restoring Deleted Recurring Event AND Notes Using Outlook 8
O Assigning a single instance of a recurring task OUTLOOK 2010 Using Outlook 3
T How to Use Recurring Email without buying an add-on for Outlook 2010 Using Outlook 1
K Recurring Tasks on specific dates, not pattern Using Outlook 0
F Outlook 2007 - recurring appointments shifted by one day Using Outlook 4
S Outlook Recurring event Using Outlook 1
J Recurring Appointment Using Outlook 1
A Forwarding recurring appointment/meeting Using Outlook 2

Similar threads

Back
Top