Nov 02 2023 11:10 PM
Hi there,
I'm very clear on how to perform a comparison of two Microsoft Project files which share an ancestry (e.g. you've created a project, some changes occur over a month, and then you compare to your original).
My question relates to comparison of two microsoft project files which do not share an ancestry.
The situation is that I am using some VBA code to programmatically create Microsoft project files based on various input data. I would then like to compare versions of these however even if nothing has changed in the input data, Microsoft Project spits out a comparison report indicating the files are completely different (even though Task name, dates and Unique ID are all identical).
Does anybody know a way to achieve this comparison ? Or does anybody know what field Microsoft Project uses to perform its comparison as I may be able to programmatically set it ?
Nov 03 2023 10:48 AM
Nov 05 2023 02:24 PM
@John-project thanks for your answer, you clearly know your stuff so I'm keen to hear more! It's interesting that you say it is the 'Unique ID' which Microsoft uses as I have two files that appear to be identical (same Unique IDs, task names and dates) as I generated both of them from the same macro. However unless I'm misunderstanding something, Microsoft's compare utility highlights them as being entirely different. i.e. shows all of the rows of file A with negative signs on the left, followed by all of the rows of file B with positive signs on the left.
If you can think of anything else I should be considering please let me know.
Would be very interested to know more about the macro you wrote as perhaps that is a path I need to go down.
Nov 05 2023 02:27 PM
Nov 05 2023 03:03 PM
Nov 05 2023 03:19 PM
Nov 05 2023 03:29 PM
I've never tried to run a comparison on two files that were generated by code. By default they would not be "genetically" related which is the basis for comparison.
The original Compare Projects utility did use the Unique ID as the reference. However, it had some issues and it wasn't until (I believe) release of Project 2010 that the utility was finally "fixed". It is possible that it now uses the GUID as the reference, I don't know.
Since you are trying to compare two files generated by a macro you will most likely need to create your own unique reference so the files can be compared, and write your own compare macro like I did many years ago.
Good luck.
John
May 22 2024 09:52 AM - edited May 22 2024 09:53 AM
@schnerrific I have a somehow different issue but still related to this topic. I am doing a comparison of 2 mpp file. however, I am using add-in. hopefully i can explain it in a way you can figure out what I'm doing.
step1: I open an mpp file (let's call it A). thus showing the add-in in the process cause it's in the menu
step 2, there is a button in the add-in that asked to select another mpp file (let's call it B) to compare with.
step 3: I should be able to open the selected mpp(B) file and compare it the existing(A)
the problem, if I call the function to open the mpp file B, it's not showing. I created a new instance of mpp in the process, but still it's not showing. can you help me make it work?
thanks,
Gilbert
May 22 2024 12:37 PM
May 22 2024 03:15 PM
May 22 2024 04:44 PM - edited May 22 2024 06:38 PM
bertwong1,
So. . . . why not use the Compare Projects utility? I created my "wheel" way back when because it didn't exist, so writing my own compare macro made sense. But now that the built-in utility exists, why "re-invent the wheel"?
John