Hi, I am using Visual C#- through VS 2008's inbuilt libraries to access MS Project. The problem I am facing is that when I am inserting new tasks into project, the task IDs change and hence the collection that I have, to perform actions upon, gets altered. Unique IDs remain unique but then, I do not know of a way to access the Unique IDs through VS 2008. For referring to the Unique ID of a particular task, I need to know the ID of the task. But then, the ID gets changed as soon as I insert or delete a few tasks. Can someone please help me out with this?? Aditya
activeproject.tasks.uniqueid(theID) -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "Aditya" wrote in message news:BA9123AA-7BC2-4139-B3AF-2290CB1431B8@microsoft.com... > Hi, > > I am using Visual C#- through VS 2008's inbuilt libraries to access MS > Project. The problem I am facing is that when I am inserting new tasks > into > project, the task IDs change and hence the collection that I have, to > perform > actions upon, gets altered. Unique IDs remain unique but then, I do not > know > of a way to access the Unique IDs through VS 2008. For referring to the > Unique ID of a particular task, I need to know the ID of the task. But > then, > the ID gets changed as soon as I insert or delete a few tasks. Can someone > please help me out with this?? > > Aditya >
Doesn't .UniqueID need a uniqeID as a parameter? How about this (sorry but VBA is how I roll): Set t = activeproject.Tasks.Add() uID = t.UniqueID You can store the uIDs or the tasks themselves in an array or collection. Bill B "Jan De Messemaeker" wrote in message news:eB%23eYhR4IHA.4988@TK2MSFTNGP04.phx.gbl... > activeproject.tasks.uniqueid(theID) > > -- > Jan De Messemaeker > Microsoft Project Most Valuable Professional > +32 495 300 620 > For availability check: > http://users.online.be/prom-ade/Calendar.pdf > "Aditya" wrote in message > news:BA9123AA-7BC2-4139-B3AF-2290CB1431B8@microsoft.com... >> Hi, >> >> I am using Visual C#- through VS 2008's inbuilt libraries to access MS >> Project. The problem I am facing is that when I am inserting new tasks >> into >> project, the task IDs change and hence the collection that I have, to >> perform >> actions upon, gets altered. Unique IDs remain unique but then, I do not >> know >> of a way to access the Unique IDs through VS 2008. For referring to the >> Unique ID of a particular task, I need to know the ID of the task. But >> then, >> the ID gets changed as soon as I insert or delete a few tasks. Can >> someone >> please help me out with this?? >> >> Aditya >> > >