none
Problem with special paste as link RRS feed

  • Question

  • Dear together,

    I use "paste special" > "paste link" within one MS project file (MS Project 2010 Professional on a dedicated Project Server).
    It is used to copy information into a dedicated columns (date1) that recalls information from other rows, e.g. dates that shall be compared.

    Task name / Start / recall delivery date (date1) / flag (delivery > need date)

    Delivery unit A / 12.06.2015 / NA / NA
    Need date unit A / 03.07.2015 / NA / NA

    Per special paste I copy the delivery date in the "recall delivery date" columns

    Delivery unit A / 12.06.2015 / NA / NA
    Need date unit A / 03.07.2015 / 12.06.2015 / no

    Now I change the delivery date to 12.07.2015

    EXPECTED
    Delivery unit A / 12.07.2015 / NA / NA
    Need date unit A / 03.07.2015 / 12.07.2015 / YES

    WHAT I GET
    Delivery unit A / 12.06.2015 / NA / NA
    Need date unit A / 03.07.2015 / 12.06.2015 / no

    I.e. the date is not re-calculated when its origin is changed - or at least not always, thus it is not reliable.
    (I saved the file and re-opened, cleaned the cache,  clicked 'calculate project' - no result)


    Any suggestions?

    Thanks in advance for your support.

    Br,

    Tobias

    Tuesday, October 22, 2013 4:15 PM

Answers

  • Tobias,

    Yeah, I thought there would be a problem with the "plus 2 tasks" approach but that's what you said in your post.

    Assuming I understand what you are saying about putting the destination address (i.e. unique ID) in the Text1 field of the source task, then the following macro will do that:

    Sub copy_dates()
    Dim t As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Flag1 Then
                On Error Resume Next
                ActiveProject.Tasks.UniqueID(t.Text1).Date1 = t.Finish
            End If
        End If
    Next t
    End Sub

    John

    • Marked as answer by der_toby Monday, October 28, 2013 9:12 AM
    Thursday, October 24, 2013 3:38 PM

All replies

  • Hi Tobias,

    It looks to me as though the paste link has worked perfectly but the Start date of "Delivery Unit A" is reset to12/6/15.

    Greetings,

    Tuesday, October 22, 2013 6:08 PM
    Moderator
  • der_toby,

    First of all let me say that you are playing with fire by using paste links. They are very prone to corruption even within a single project file.

    Nonetheless I tried your scenario on a simple file and the link updated as expected. Are you sure you have calculation set for automatic? Did you properly copy the Start field and then paste link it into the Text1 field?

    John

    Tuesday, October 22, 2013 6:31 PM
  • I'd agree with John.

    Paste link is a risky practice. It can be used for example for hammock tasks, but you should be certain to keep track of the link you've made. Since the link information is not recorded in any field, it is sometimes tricky to track changes and impacts. Moreover those types of OLE links are easily corrupted.

    If the file is corrupted, saving it locally in XML format then again in mpp and redoing the links may help..


    Guillaume Rouyre - MBA, MCP, MCTS




    Tuesday, October 22, 2013 6:59 PM
    Moderator
  • Dear together,

    correction of example (thanks Jan):

    WHAT I GET
    Delivery unit A / 12.07.2015 / NA / NA
    Need date unit A / 03.07.2015 / 12.06.2015 / no  

    In the past I tried in another small test file as well and there it was working fine.
    "Are you sure you have calculation set for automatic?" YES
    "Did you properly copy the Start field and then paste link it into the Text1 field?" YES (but it is a Date1 field, to be precise).

    The lines are always grouped, thus it can in principle easily be spotted, if the dates do not fit any longer (But we are talking not only a few lines here).

    How likely is it that the file is corrupted again and again?  

    I am sure that the correct field was copied/pasted and that it is now not updated in case of change.

    Br,

    Tobias

         
    Wednesday, October 23, 2013 7:27 AM
  • Hi Tobias,

    From my experience with OLE links - it's almost certain they will become corrupt again, and again.

    I'd agree with the others who have said to avoid this functionality - my users no longer use this functionality for this reason. If you let us know what you're trying to achieve, maybe we can suggest an alternative solution.

    Thanks,
    Andrew

    Wednesday, October 23, 2013 7:51 AM
  • Dear Andrew,

    what I would like to have is:

    I have several specific tasks that have an end date.

    This end date I want to copy two lines (tasks) below into the column date1.

    It would be nice, if this works automatically like the copy and paste special link. But if you have an idea, like may a button for a macro that I have to press, it is also acceptable.

    I could e.g. identify the tasks in a text column with "input" and "output" or sth that the macro can give a look to it.

    The problem is, that my macro experience is based on Excel and not on Project.

    Do you have an idea how it could work?

    Br,

    Tobias

    Wednesday, October 23, 2013 8:45 AM
  • Tobias,

    If the task you want to copy the date to is ALWAYS two task lines below, then the following macro will work assuming you have identified the "several specific tasks" with a "yes" in the Flag1 field.

    Sub copy_dates()
    Dim t As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Flag1 Then
                On Error Resume Next   'cover case where flagged task is the next to last and last task
                ActiveProject.Tasks(t.ID + 2).Date1 = t.Finish
            End If
        End If
    Next t
    End Sub

    John


    • Edited by John - Project Wednesday, October 23, 2013 3:37 PM explanation
    Wednesday, October 23, 2013 3:35 PM
  • John,

    thx - but I have really some cases where it is not plus 2 tasks.

    The rest works fine. Is it possible to handle it, if I write in addition to YES in FLAG1 also the Unique ID in Text1 of the task where to paste the information?

    THANKS a lot!

    Br,
    Tobias

    Thursday, October 24, 2013 10:14 AM
  • Tobias,

    Yeah, I thought there would be a problem with the "plus 2 tasks" approach but that's what you said in your post.

    Assuming I understand what you are saying about putting the destination address (i.e. unique ID) in the Text1 field of the source task, then the following macro will do that:

    Sub copy_dates()
    Dim t As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Flag1 Then
                On Error Resume Next
                ActiveProject.Tasks.UniqueID(t.Text1).Date1 = t.Finish
            End If
        End If
    Next t
    End Sub

    John

    • Marked as answer by der_toby Monday, October 28, 2013 9:12 AM
    Thursday, October 24, 2013 3:38 PM
  • Tobias,

    Yeah, I thought there would be a problem with the "plus 2 tasks" approach but that's what you said in your post.

    Assuming I understand what you are saying about putting the destination address (i.e. unique ID) in the Text1 field of the source task, then the following macro will do that:

    Sub copy_dates()
    Dim t As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Flag1 Then
                On Error Resume Next
                ActiveProject.Tasks.UniqueID(t.Text1).Date1 = t.Finish
            End If
        End If
    Next t
    End Sub

    John

    John,

    that works perfectly - thanks!

    Br,

    Tobias

    Monday, October 28, 2013 9:12 AM
  • Tobias,

    You're welcome and thanks for the feedback.

    John

    Monday, October 28, 2013 2:53 PM