Add Child to a LookupTable in code Ms Project 2007 SP1

M

mathies

I have a solution that work fine with Project 2003, but doesn't work with the
2007.

I whats to add datas to an OutlineCode.

I create the field like this:
OutlineCode outline1 =
projectApp.ActiveProject.OutlineCodes.Add(PjCustomField.pjCustomTaskOutlineCode1, "SubLevel1")
outline1.CodeMask.Add(PjCustomOutlineCodeSequence.pjCustomOutlineCodeCharacters, null, null);
outline1.OnlyLookUpTableCodes = true;

Add child like this:
LookupTableEntry newEntry =
project.OutlineCodes[1].LookupTable.AddChild("Value123", null);

But the newEntry.IsValid is always= false.

If I open the customize files windows and just open and close de
OutlineCode1 field, all entry are now valid.

How can i make the value valid by juste using code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top