MS PRoject Automation

S

Satish

How do we use the TaskTables collection in c#.

I have tried to add a new TaskTable but it gives a COM automation error.
pc.TaskTables.Add("S",Microsoft.Office.Interop.MSProject.PjField.pjTaskID,true);

Can someone please throw some light on this??
 
R

Rod Gill

I'm no good with C# as VB is significantly faster with office automation. I
suggest you record a VBA macro in project of you adding a Task table then
see what code gets recorded. You then have to convert that to C#.

Note that VBA and VBA have optional parameters. you will have to add every
parameter as C# doesn't have optional parameters: one of the reasons why VB
and VBA is faster to code!!
 
J

Jan De Messemaeker

Hi,

AFAIK a Tables collection does not have an add method.
I thought one has to use the TableEdit method.

HTH
 

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