Cannot programmatically select a task in Team planner - Office MS Project 2010

Hi,
I'm using Visual Studio 2010 32 bits, MS Project 32 bits on a windows 7 64 bits environment.
I created a MS project 2010 addin in Visual Studio. I can do many things with this addin, add ribbon, create tasks,
change colors in gant view...
However I cannot selected a task in the team planner view !
I use SelectTPTask in the application instance as referenced (http://msdn.microsoft.com/en-us/library/ms474284.aspx).
After this selection I want to change the color of the task by using SegmentFillColor method but nothing happens.
If I manually click on a task then SegmentFillColor works and the task color is changed.
Here is the code of the action:
private void buttonPriority_Click(object sender, RibbonControlEventArgs e)
var app = Globals.ThisAddIn.Application;
var pj = app.ActiveProject;
//create Tasks
Task newTask = pj.Tasks.Add("First task");
newTask.Duration = "3";
newTask.ResourceNames = "Resource A";
newTask = pj.Tasks.Add("Second task");
newTask.Duration = "4";
newTask.ResourceNames = "Resource B";
//Change color of the assignments
foreach (Task t in app.ActiveProject.Tasks)
if ((t != null) && !(bool)t.Summary)
bool b1 = app.SelectTPTask(t.UniqueID);
bool b2 = app.SelectTaskAssns();
bool b3 = app.SegmentFillColor(0xFFFFFF);
Is it a bug or I do not use it properly,
Thanks,
Alex.

Working solution (MS Proj 2013) for similar task is:
Sub ChangeTaskColorBasedOnCondition()
    Application.ViewApply Name:="Team Planner"
    For Each task In ActiveProject.Tasks
        Application.SelectTPTask (task.UniqueID)
        Application.SelectTaskAssns
        If (InStr(task.Name, "t"))
Then
            SegmentFillColor Color:=192
        Else
            SegmentFillColor Color:=0
        End If
        Application.SelectTPTask
    Next
End Sub

Similar Messages

  • Macro to colour tasks in team planner

    Hi Everyone,
    I have experience of writing macros for excel and the general format for such things but I dont know where to strat in Project 2010.
    What Im trying to do is write a macro so that if the task name has "collect" in it, its red and if it has "deliver" in it its coloured red.
    I have flags that do this for me in the gantt view so I could reference back to that I guess.
    Can you help?
    Thanks
    Alex

    cossie2know,
    It sounds like red is your color of choice.
    Unfortunately Project doesn't make this as easy as it may seem. In order to use the SegmentFillColor Method in the Team Planner view, the user must manually select the resource assignment. There appears to be no way to automate the selection in that view.
    You could write a macro that found all the desired tasks and then create a resource filter for each of those tasks and apply that filter to the Team Planner view but you would still have to manually select those resource assignments that you wanted to color
    code.
    Not what you wanted to hear, but that's how it works, or in your case, doesn't work.
    John

  • Transfer Gantt Chart View color's automatically to Team Planner View

    Hi there.  My project has 7 different resources with various Resource Names ending characters.  I've automatically color coded the bars on my Gantt Chart based on resource allocation by using Flags 1-7, Custom Fields, and the formula IIf(Left([Resource
    Names],3)="xxx",Yes,No).  I then change the format of each bar style to the color I desire.  
    I am looking for a way to automatically transfer the colors I have assigned the tasks in my Gantt Chart to the Team Planner view.  I don't believe there is a simple way to do this but would appreciate any help aside from manually formatting each of
    the tasks in Team Planner view.
    Thanks for the help!
    -Joe

    jbarrazotto --
    Alas, there is no way to do what you want with the Team Planner view.  This is because there is no dialog similar to the Bar Styles dialog where you can control the formatting.  Basically, the Team Planner view has definitions for Manually Scheduled
    tasks, Auto Scheduled tasks, Actual Work on tasks, External Tasks, and Late Tasks.  Using the corresponding buttons in the Styles section of the Format ribbon with the Team Planner Tools applied, you can control the fill color and the border color for
    every bar of one of those types.  But there is no way to add other buttons to the ribbon to control the Gantt-like bars that are shown in the Team Planner view.  So, what you want to do with the Team Planner view is not possible.  Sorry. 
    Hope this helps.
    Dale A. Howard [MVP]

  • Project 2013 freezes in Team planner view

    Hi,
    While right clicking and changing assignments in a Project file the Team planner freezes and Project must be restarted, this happens all the time and too frequent. The first thing that happens is that the large info box which is shown on right click together
    with the smaller one with percentage etc. dissapears. Then the changes can still be saved but Project can not be shut down in the normal way but must be closed by shutting down the process in the Task manager. Then it is just to open the file and
    continue as the Team planner works normal again until it freezes again. This has been so since the very beginning, but did not happen in the 2010 version. It only happens in the 2013 version which of course is the one we use as the reports in it are so great.
    Any ideas to get rid of this annoying problem?
    Kind regards //Anders

    Hi Ben,
    Thanks for looking into it. Perhaps it is something wrong with the installation or the PC that it runs on, have not thought of that before. Should try to copy the file to another computer and download a trial version to run it on and see if the problem is
    still there. Otherwise Snag it seems like a good idea. The time for project to stop working varies a lot, normally everything from 3- 10 minutes. There is one thing that normally seems to get project to stop working sooner and that is when switching between
    the Team planner and the Gantt view.
    The work sequence is like this:
    -Open the project file
    -Expand all tasks in the Gantt view
    -Switch to Team planner, begin to drag & drop tasks between resources
    -Mark a task in the Team planner view and switch to Gantt view to check how the project where the marked task is located underneath is following the plan.
    -Switch back to Team planner, continue to switch tasks between resources
    -Mark a task in the Team planner view and switch to Gantt view to check how the Project is following the plan, as above.
    After a number of switches between the views project normally just stops working completely. Memory usage normally goes up to 140 MB, not much but still an increase towards the normal. The above sequence is the quickest way of getting Project to stop working.
    Would be interesting to see if you would get any problems repeating the sequence. If that would work for you for 10 minutes there must be something wrong with either the project installation or with the computer.
    Thanks and kind regards  //Anders

  • Team Planner -- Customization

    We recently upgraded to 2010 professional, and I was pleased to see the team planner view, which was something I was attempting to do in 2007.  We are using MS Project 2010 Professional more for resource management than project management.  In
    fact, we only assign one task per resource per project, just so we can have a clear picture of our resource utilization.  For example, if "Joe" is going to work on this project for 50 days, regardless of what he is doing, he goes in at 50 days (and the
    duration is calculated based on the percentage he is allowed to work on projects vs. day-to-day work (MAX Units), and the percentage the manager has assigned for him to do this work (Assigned Units).  We don't care what "Joe" is doing, just that his time
    is booked.  We have assigned more than one resource to the same task, and the team planner (unlike the resource usage view), does allow breakdown by resource, and not just by project.
    The purpose of this view is to provide management reports (printed/electronic PDF copies), for their weekly meetings to discuss the status of the resources and the impact of any new projects being proposed.  So I need to show more info then the basic
    info in the default Team Planner View.
    I just read another question regarding adding extra columns to this view and was disappointed to discover that cannot be done.  I have a shared resource pool with 140 resources and a master project schedule with 50 projects, and I am running the
    team planner view against the shared pool.  So, like the other person, I wanted to add a column with the project name (since the tasks are similiar in name, it gets confusing if it only shows the task name, as we have no idea which project it is associated
    with), as well as add a column for "section" (a custom field created in the resource view so each manager can view his own team), and a column showing Max Units, so we can understand why someone with only 1 task is overallocated.  As well, I would like
    to customize the task bar to include the Units for that resource (ie. 50%), so I can understand also why he is overallocated or available at glance. 
    As a workaround for the missing project name, I embedded the name in the task, which is very time consuming and not a real solution, since at any given time I have over 50 projects in the master project schedule.
    I hope this is something that is being considered in future, since it makes sense to me that management wants a view of the resource pool by assigned task, by project, and understanding of overallocation. 
    Trish :)

    You can create and apply a Group to list all tasks by resource. You could also group by Project then by resource or the other way around. In Proejct 2010 select the View tab, then in the
    Group By drop down box select New Group By and select the fields to group by.
    If you like teh Group, copy it to your Globa.mpt file using teh Organizer so it's available in all your projects.
    Rod Gill
    The one and only Project VBA Book
    Rod Gill Project Management

  • Hiding non-working time in Team Planner View

    Hello there.  The tasks in my project are typically between 2-5 hours over a week period.  In Team Planner View, I'm hoping to provide a better representation of free time between tasks by making my bottom tier hours in a 4 hour count.  However,
    decreasing the scale forces the Task names become cut off when the event itself shrinks.
    I was hoping to remove the non-working time (i.e., nights and weekends) from the Team Planner view to enable a better view.  I'm aware that the capabilities of Team Planner View seem to be limited, but is this type of formatting at all possible?
    Thanks for the help,
    Joe

    Joe --
    After I created my response and posted it, I wondered whether you wanted to completely remove the nonworking time periods.  This is not possible.  The best you can do is to remove the shading for nonworking time periods, but you cannot remove them
    entirely in any view.  Hope this helps.
    Dale A. Howard [MVP]

  • Trying to get team planner to show more information

    Is there any way to get team planner to show more information about the tasks? In calendar view, you can set the bars to display all sorts of information, but I can't seem to find the equivalent in Team planner. I want the bars to display, hours work and
    one custom field, as well as the task name.
    On this subject, I'm sure I must be missing something, but project seems to have missed the point of breaking tasks down into manageable sections. For example, I have a project, say 'Build house', summary tasks might be 'build conservatory', 'build kitchen'.
    Each might have 'put in windows', the first task of which might be to get quotes. All that then appears in team planner, or any of the resource management views is the task name 'get quote', with no idea which summary task it belongs to. I have to write the
    correct summary task in a custom field for each task, surely this can't be the best way to do it?

    Hi,
    The good news is that the resouce usage view has a field called Task Summary Name, so no need for a custom field.
    The bad news is that yes, you cannot modify the Team Planner view.
    Hope this helps,

  • Cannot delete or reassign tasks or assignments with protected actuals

    I am working on Project server 2013 and trying to update one of the projects which gives an error: "cannot delete or reassign tasks or assignments with protected actuals".
    I need to change the entire plan (please note that this project is published to EPM and already has actuals in it), NOw I have checked out the project in MPP and trying to remove some tasks and I get this error"cannot delete or reassign tasks or assignments
    with protected actuals".
    Please suggest how these tasks can be deleted and how I can update the project plan back to EPM.
    Is there anything that we need to turn off in the server settings to allow changes to the project plan. and Also unprotect the actuals in the project plan.
    Thanks.

    Hi,
    It might be that you have the option "Only allow task updates via Tasks and Timesheets" enabled in the "task settings and display" under the "protect user updates" section. This prevents the project owner (project manager) from
    updating (adding, deleting) any actuals directly in the project plan. It enforces actuals to come from the timesheet/task updates once approved. 
    Thus it is normal that you cannot modify an entire task with some actuals. The best practice would be not to modify any actuals, just updating the remaining work, eventually reassigning it to another resource. But in case you do need to make changes to some
    past activities, then you have to disable the option I mentionned above.
    See reference
    here (for 2010 version bu still applicable).
    For reassigning a task with actuals, you can for example open the project build team dialog box, select the new and the old resources from left and right side and click on "replace". Here is another
    method from the task tab.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • A dynamic Team Planner View to concurrent users

    Hello, I currently have MS Project Professional 2010. Our business is looking into possibly upgrading our system but we need the team planner view in whatever we choose. We currently have hundreds of projects and thousands of tasks linked to resource pool.
    The team planner view is the easiest and fastest view for the business to identify what each person is doing on a particular day, who is helping them, who is working on their project, who is on vacation, etc. Issues we're having right now include:
    1) Project Professional freezes when multiple users try to access the team planner view at the same time. Even after downloading the hotfix package.
    2) We tried uploading some work to Sharepoint but Sharepoint doesn't like tasks with start-to-start predecessors or lag times which greater than 50% of our tasks have.
    3) The printable team planner view prints out hundreds of blank pages between sets of dates. I'm assuming they are "unassigned tasks" and there is no method of removing them. Resource names don't carry over to the second set of dates.
    Is team planner view available in Project Server or the PWA? We're trying to find a way to get this view to everyone. Allow multiple concurrent users to view it at the same time. And to have their view change simultaneously as I change it without having
    to upload or print a new team planner view every time I change something.
    Thanks for the help.

    Thanks for the reply Andrew. We explored using the Resource Assignment View but it had its own set of issues like:
    1) I can assign up to 40 tasks a week to one person, this creates quite a list for each person as the Resource Assignment View lists the tasks in the column under the person's name. A filtered list of one week still creates a long list, 40-50 pages long,
    for 30-40 resources.
    2) Our resources had a hard time finding who was helping them on certain tasks because of this gigantic list. Again, they are unable to access MS Project without freezing the document so they can't open the task and find out who's helping. Therefore, we
    like the condensed Team Planner view.
    I will explore the SSRS report option but from a little light reading, it appears as though this report doesn't automatically update every time I make a change to the schedule. Therefore, I need to manually create a new report everytime I make
    a change to the schedule?
    Thanks Again,
    Travis
    Travis

  • Project Team Planner

    Hi everyone,
    do we need the project server 2013 to use the team planner in project 2013?
    Is the team planner a part of Project standard 2013? (in 2010 it was only part of the professional version)
    I found it in the 2013 standard description:
    http://www.microsoftstore.com/store/mshk/en_GB/pdp/productID.260731200
    Thanks in advance!

    it-admins --
    No, you do not need to use Project Server 2013 to use the Team Planner view.  This view is available ONLY in the Professional version of Microsoft Project 2013.  It is NOT available in the Standard version of the software.  In addition to
    the Team Planner view, the Professional version of Microsoft Project 2013 offers you the Inactivate Task feature, which is a better way to cancel unneeded Baselined tasks than deleting the tasks.  Hope this helps.
    Dale A. Howard [MVP]

  • Team Planner not working. Click on Team Planner and nothing happens.

    I have Project Professional 2010 and using with Project Server 2010. When I go the the View ribbon and click on Team Planner, nothing happens. Is this a view or a piece of functionality? I looked in Organizer and also do not see any view named Team Planner.
    Not sure why this is not working. Anyone know nwhat the issue may be and how to get Team PLanner working?

    Rick VF --
    Navigate to the Task ribbon and then click the Gantt Chart pick list button (little down-arrow below the Gantt Chart button).  Examine the list of Views shown on the pick list.  Do you see the Team Planner view listed?  If not, click the More
    Views item.  In the Organizer dialog, do you see the Team Planner view listed in the left side of the dialog?  If the answer is NO to both questions, then I would suspect that someone has intentionally deleted this new default View from your Microsoft
    Project 2010, and you will probably need to reinstall the software to get it back.  By default, the Team Planner view should be available to you in Microsoft Project 2010.  Let us know if this helps.
    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

  • Resource cannot see their assigned tasks on the Timesheet page

    One of the resource is not able to see tasks assigned to him in his timesheet after publishing the project. I have checked all possible reasons listed in the the document below.
    http://projeqz.freshdesk.com/support/articles/169136-team-members-cannot-see-their-assigned-tasks-on-the-timesheet-page-or-task-page-in

    Hi Project Help,
    In addition to the reasons mentionned in the article below (booking type and assignment owner), check the following:
    The publish field for the assignments must contains "YES",
    The project must be published successfully (with no errror messages in the queue),
    The resource must be an enterprise resource and not a local resource,
    You must look at the correct time period,
    You must ensure that there are no filters in the timesheet view,
    Then if it is a newly created task (after the timesheet was created), try inserting the assignment using the "insert row" button,
    If none of above work, for the assignments in question, change the assignment owner for any other resource, publish the project, change back the assignment owner to the right resource and publish again the project,
    Finally, remove the assignment and create it again (and publish).
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app completely : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • TS1398 After the 6.0.1. update on my iPhone 4s the option for wifi has greyed out and cannot be selected. What can I do to restore wifi?

    I have held off updated my iPhone 4s with the 6.0.1 but having problems connecting to wifi I thought maybe being out of date was the problem.
    Having done the update the wifi option is now greyed out and cannot be selected at all.  I have rebooted, forgotten networks and turned on and off so many times.  There is nothing wrong with the wifi at home as other devices connect no problem.  What can I do?

    I'll repeat the Apple support pages linked in the previous post:
    http://support.apple.com/kb/TS1559
    Go through the step outlines there starting at the top and work down until you've solved the problem.

  • "Function code cannot be selected" error while uploading a document.

    Hi,
    When we try to upload a document into SAP the user is getting the error "Function code cannot be selected". Detailed error is given below. Only one user is facing this error in PRD. For all other users it is working fine. We replicated the same issue in testing systems and it is working fine there with the same user's id.
    The detailed error is,
    No batch input data for screen SAPLF040 0300
    Message no. 00344
    Diagnosis
    The transaction sent a screen that was not expected in the batch input session and which therefore could not be supplied with data.
    Possible reasons:
    1. The batch input session was created incorrectly. The sequence of screens was recordly incorrectly.
    2. The transaction behaves differently in background processing in a batch work process than when running in dialog (SY-BATCH is queried and changes the screen sequence).
    3. The transaction has undergone user-specific Customizing and therefore certain screens may be skipped or processed differently, according to the current user. If the person who created a batch input session is not the same as the person now processing it, this problem may occur frequently.
    System Response
    None.
    Procedure
    For 1: Either re-create the session or process it in expert mode. Correct the batch input program.
    For 2. It is very difficult to analyze this problem, particularly in the case that the screen sequence or the display-only options of fields differ according to whether the transaction is being processed in the background or as an online dialog. It could also be that this kind of transaction cannot run with batch input.
    For 3: Have the creator of the session process it. If no error occurs now, then this is a program with user-specific Customizing.

    Hi Amar,
    I am facing the same issue while processing Vendor master inbound idocs, Few Idocs gone in error with error message "Function code cannot be selected".
    Could you please suggest any solution found for the same.
    Thanks in advance
    Shivam

Maybe you are looking for