Defining Link Type

The LinkType property exposed by the TaskLink class is used to retrieve or define the type of link between two tasks. It reads and writes one of the values defined by the TaskLinkType enumeration type.

To define link type in Microsoft Project:

  1. On the View menu, select More Views and then Task Entry Form.
  2. Double-click the desired task.
  3. Select the Predecessor tab.

defining task links

The code samples below set a link type as “Start-to-Start”, the default link type is “Finish-to-Start”.

The code samples below display link types by traversing the task links in the project and printing the result to a console window.