How do you keep the Unique ID value like the "move event" with code???

M

MacPhatKat

I posted this question to the microsoft.public.project.vba group and
was unable to get an answer.

My original question was:

I noticed if you cut and paste a task in the grid view the Unique ID
will change. However if you select the row using the Grey Row Number
on the far left of the grid, the mouse cursor will change to four
arrows and allow you to drag the task to a new location, after you
drop the task the Unique ID remains the same.

I tried to record a macro to see if this sequence could be captured,
but the drag/drop ability was disabled after the recording started,
and only worked after the recording stopped.

I want to emulate drag/drop behavior using COM calls. I have a .Net
wrapper a round the MS Project 10.0 Object Library. For exact reasons
not relevant to this group, I am associating programmatic business
data with a task in my own application using the Unique ID as sort of
a pointer to the task. In certain instances I need to MOVE the task to
below a new summery task. I do this in my own app using the COM calls
so the user doesn't have to open MS Project and do it themselves.

Basically, I'm trying to find a method that would do this move action.
I have tried to reassign the ID, Index number, and Outline Number, but
all these properties are read only. I also can't find a method that's
appropriate.

What code would I have to write to duplicate the drag and drop
behavior, and keep the Unique ID after the task has been moved to a
new location?

A link to the original post is here:

http://groups.google.com/[email protected]
 
J

John

MacPhatKat,
A method is described in my Sunday, June 27 response to your post on the
other newsgroup. However, it is possible someone else has a better
answer.

John
 

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