A. I would like to know if there is any way to move a task between projects and preserve the GUID?

B. If this is not possible, then If someone could help me with a macro that would facilitate this.

I think clarification on this issue would help the community in general as I don't think I am the only one who has had this issue.


A. When trying to move a task from either a master project to a sub-project or vice versa gives the following error:

You cannot move a task or resource from one file into another. Try copying the task or resource and then pasting it into the other project.

I realise that this is probably because the task is considered a unique item to that schedule. After doing high level planning, I like to split logical sub-projects out, but work may have already commenced and I use the GUID downstream so I need it preserved.

B. I am not adverse to a macro task moving solution and I think the pseudo code would be something like this:

1) User selects tasks to move
2) User Clicks Button
    a. Macro copies GUID and resources into a spare text fields
    b. Macro cuts the selected tasks out
3) User selects where tasks needs to be pasted
    a. Macro prompts as to where tasks should be moved to OR
    b. User selects row where tasks should be inserted and clicks another button which initiates the pasting component of macro / second pasting macro
4) Macro pastes in tasks
5) Macro updates newly generated GUID with copied GUID and also the resources

After having a look through Project 2013 SDK, I cannot see how to set GUID.

Plus I am a bit rusty in the VBA department.

Any help would be appreciated.

Cross Posted on: Office Dev Forums - Project forums > Project Customization and Programming

Thanks.

1

There are 1 best solutions below

0
On

A) MS Project can't move a task from one project to another. Even drag+drop will just copy it. If you use cut+paste, the old one will be gone at least. But, in any case, the new task will have a new GUID.

B) A task GUID cannot be modified, neither manually in MS Project nor via a VBA macro. I.e., for your approach, you should create some kind of own unique code that the people can use to reference or to track the tasks, e.g. a WBS code or just an Outline Code.

Note: Copying a project will renew all GUIDs as well. But, copying a project keeps the Unique IDs. Perhaps this is a way for you: First creating one file, and later splitting it by copying the file and then removing the obsolete tasks...

Regards, KAwi42