Re-building a file through code??

J

JJ

I have what I believe to be a corrupted file. I want to re-build the
file so I thought simply copying all the tasks and pasting into a
blank file would remove whatever corruption I had. Unfortunately, I
think the corruption was copied along. So my question is this...

Is possible to create a new file through code by going task-by-task
and building the file based on the basic task data? BTW, there is no
cost data in the file and it's not resource loaded. It's just schedule
data (tasks, dates, durations, logic)

File A is the corrupted file. File B is the "new" file.
So I was thinking that through code one could transfer the following
from File A to File B:
1) Transfer all calendars from File A to File B.
2) Transfer the task names from File A to File B.
3) Indent the tasks in File B according to the Outline Level in File
A.
4) Transfer the durations (A to B).
5) The ID numbers should be the same so I COULD transfer Predecessor
and Successor data (A to B).
6) Transfer Constraint Type and Constraint Date (A to B).
7) Transfer % Complete (A to B).
8) Transfer calendar data for each task (A to B).
9) Transfer Baseline Start and Baseline Finish (A to B)

Is this feasible? Is there anything that I am missing? Is there any
reason why this would not work? Does ANYONE have a routine that
already does this -- even if it does it differently!

Thanks!
JJ
 
J

John

JJ said:
I have what I believe to be a corrupted file. I want to re-build the
file so I thought simply copying all the tasks and pasting into a
blank file would remove whatever corruption I had. Unfortunately, I
think the corruption was copied along. So my question is this...

Is possible to create a new file through code by going task-by-task
and building the file based on the basic task data? BTW, there is no
cost data in the file and it's not resource loaded. It's just schedule
data (tasks, dates, durations, logic)

File A is the corrupted file. File B is the "new" file.
So I was thinking that through code one could transfer the following
from File A to File B:
1) Transfer all calendars from File A to File B.
2) Transfer the task names from File A to File B.
3) Indent the tasks in File B according to the Outline Level in File
A.
4) Transfer the durations (A to B).
5) The ID numbers should be the same so I COULD transfer Predecessor
and Successor data (A to B).
6) Transfer Constraint Type and Constraint Date (A to B).
7) Transfer % Complete (A to B).
8) Transfer calendar data for each task (A to B).
9) Transfer Baseline Start and Baseline Finish (A to B)

Is this feasible? Is there anything that I am missing? Is there any
reason why this would not work? Does ANYONE have a routine that
already does this -- even if it does it differently!

Thanks!
JJ

JJ,
Yes it could be done with VBA but that's probably a last resort. Go to
our MVP webpage at, http://www.mvps.org/project/faqs.htm, and take a
look at FAQ 43 - Handling project file corruption and/or bloat. In
particular, method 4 will probably take care of your problem.

John
Project MVP
 

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