Add a column to Grantt Chart to MS Project

Hi there, i want to add a column to a grantt chart , this is my code snippet:

TableEdit Name:="&Entrada", TaskTable:=True, NewName:="", _
FieldName:="", NewFieldName:="% completado", Title:="", _
Width:=10, Align:=2, ShowInMenu:=True, LockFirstColumn:=True, _
DateFormat:=255, RowHeight:=1, ColumnPosition:=1, AlignTitle:=1
TableApply Name:="&Entrada"
SelectTaskColumn Column:="% completado"
EditDelete

I have an spanish version thats why appear those strings "% completado" (Task Percent Complete), like you'll see thats a not what a looking for...i want something like this:

Columns.Add(ColumnType:= enumTaskPercentComplete,index:=1 , etc etc)---

sorry for my bad english

keep coding.



Answer this question

Add a column to Grantt Chart to MS Project

  • n0n4m3

    Per the support engineer:

    I Check the project object model.

    This is the project 2000 Model:

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnpom/html/pjtocobjectmodelapplication.asp

    and this is the Project 2003 model:

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/pjsdk/html/pjtocobjectmodelapplication_HV45317288.asp

    I found their objects are different. In project 2000, there hasn’t such property. I suggest partner record a Marco for his add column operation. Then read the Marco recorded by VBA, this would help partner understand in project 2000, which object should be used. This is a common way to dev with office applications

    Regards, Xiang

    -brenda (ISV Buddy Team)



  • Buddhike de Silva

    thnkz...but its not working...i get the following error:

    El objeto no acepta esta propiedad o metodo (Error 438)

    The object does not accept this property or method (Error 438)

    its ms project 2000...


  • JasonSacks

    Per our support engineer:

    Solution:

    ===================

    Please try to use the follow code:

    ActiveProject.TaskTables(0).TableFields.Add pjTaskActualFinish, pjRight, 10, "Titlename", pjRight, 0, True

    It is not called Columns but TableFields.

    Use this code you can create a new field in the project task table.

    -brenda (ISV Buddy Team)



  • Add a column to Grantt Chart to MS Project