How do I refer to task IDs when a Unique Id is known?

A

Aditya

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
 
B

Bill B

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top