Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
I want to open a MS Project file and create a list of the Task table field
names. (e.g. ID, Name, Start, Finish, etc.) I want the complete list of field names to populate to an Excel worksheet. I am looking for code to do two things: 1: List the Task table field names from the task collection 2: Possibly open the MS project file without having a copy of MS project open. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
Oops, let's see. Something like this:
Dim projectApplication As New MSProject.Application projectApplication.FileOpenEx "C:\data\temp\project.mpp" Dim field As tableField For Each field In projectApplication.ActiveProject.TaskTables(projec tApplication.ActiveProject.CurrentTable).TableFiel ds Debug.Print field.Title Next Is that what you are looking for? Colby |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
Seems close.
I get lots of blanks for titles and I am not sure if it is giving me the same list as the enums that you get from taskItem.Name in your last post. What I want is the same list that pops up when you type taskitem and the period. I just want to loop through and I will send it off to an array. Thanks again "Colby Africa" wrote: Oops, let's see. Something like this: Dim projectApplication As New MSProject.Application projectApplication.FileOpenEx "C:\data\temp\project.mpp" Dim field As tableField For Each field In projectApplication.ActiveProject.TaskTables(projec tApplication.ActiveProject.CurrentTable).TableFiel ds Debug.Print field.Title Next Is that what you are looking for? Colby |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
I get the same result. Let me try it another way...
Colby |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
Got it:
Dim projectApplication As New MSProject.Application projectApplication.FileOpenEx "C:\data\temp\project.mpp" Dim field As TableField For Each field In projectApplication.ActiveProject.TaskTables(projec tApplication.ActiveProject.CurrentTable).TableFiel ds Debug.Print FieldConstantToFieldName(field.field) Next I was missing the call out to FieldConstantToFieldName Colby |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
Excellent! Thanks!
"Colby Africa" wrote: Got it: Dim projectApplication As New MSProject.Application projectApplication.FileOpenEx "C:\data\temp\project.mpp" Dim field As TableField For Each field In projectApplication.ActiveProject.TaskTables(projec tApplication.ActiveProject.CurrentTable).TableFiel ds Debug.Print FieldConstantToFieldName(field.field) Next I was missing the call out to FieldConstantToFieldName Colby |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open MS Project From Excel & read Task Properties List
No problem! Please rate this post if it was helpful and have a great
holiday! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
export Exel task list into Project 2002? | Excel Discussion (Misc queries) | |||
How do I hyperlink from excel to a task in project? | Excel Discussion (Misc queries) | |||
How do I import a date from a project scehdule task into excel? | Excel Worksheet Functions | |||
With VBA from Excel: Open Project, extract resource list and copy it to a worksheet, close project. | Excel Programming |