If you work with mpp files only then "Add a custom field" means pick one of standard custom fields: Text1-32, Duration1-.., Date1-.., Number1-.., Flag1-.. depending on what type of your data and assign your own label to the field.
To do that you should use Table.TableField.Add
method. Here is a link to MSDN. Table is a grid on the left in the MS Project.
You can either redefine one of standard tables Available through Application.Tables
or create your own using Application.TableCopy
Application.TableApply
.
From my experience common rule about MS Project Programming: try to find dedicated object for what you need and if there is no such object - check Application.