Add New Task to OutlineChildren Collection Using VBA

C

C. P. Durkin

Hi all!

I'm trying to update project files from an external data source, using
Project VBA and an ODBC driver. We use stand-alone copies of Project 2007
Standard, so SQL Server is not involved. I need to insert Tasks into the
collection of OutlineChildren for specific "Parent" Tasks found within a
Project file.

Using the following statement, inserts a new Task at the end of the Project
file, not into the collection of OutlineChildren of the current Task object:

Dim newTask as Task
Set newTask = objTask.OutlineChildren.Add

** code used to set newTask properties **

Does anyone know of a way to add a new Task directly into a collection of
sub-tasks?

I can handle the resorting of the sub-task collection, once the new task has
been associated with the correct parent task.

Thanks for your time,

Chris Durkin
 
C

C. P. Durkin

Thank you very much Mr. Gill! I wasn't passing the correct information into
the "Before" parameter of the ADD method. No need for Task sorting hocus
pocus, now!

Chris Durkin
 

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