Importing list of projects

R

Rood

I have a list of projects in Excel. I`d like to create those in Project 2007.

From the SDK it seems I can do that programmatically but is there an easier
alternative?
 
R

Rod Gill

You could create the projects in a database then open in Project from the
database. You will need to read and THOROUGHLY digest the pjdb.htm file
saved in one of Project's program folders.

Creating projects in Project itself via automation is the most Project
version independent way to create files.

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 
F

faziolia

I have a list of projects in Excel. I`d like to create those in Project 2007.

From the SDK it seems I can do that programmatically but is there an easier
alternative?

I created a macro you can find below. The macro expects to have an MS
Project file where:
"task name" is the name of the project to be created
- text1 is the first custom field to filled
- text2 is the secondo custom field to be filled
.....
- text9 is the ninth custom field to be filled.

For each task in the master project, the macro creates a new project,
sets the custom fields value, save the project to a project server and
finally publishes the project.

Before you run the macro you must change:
- the number of custom fields you need to fill
- the name of the custom field
- the name of the project server where data is saved


---------------------------------------------------------------------------------------------------------
Sub CaricamentoDati()

Dim oMasterProject As Project
Dim iCounter As Integer
Dim myTemp As Variant
Dim oTask As Task
Dim oNewProject As Project

Dim szNewProjectName As String
Dim szCustomField1 As String
Dim szCustomField2 As String
Dim szCustomField3 As String
Dim szCustomField4 As String
Dim szCustomField5 As String
Dim szCustomField6 As String
Dim szCustomField7 As String
Dim szCustomField8 As String
Dim szCustomField9 As String

szCustomField1 = "type of project"
szCustomField2 = "project category"
szCustomField3 = "it area"
szCustomField4 = "business"
szCustomField5 = "functional area"
szCustomField6 = "geographical area"
szCustomField7 = "requesting company"
szCustomField8 = "year"
szCustomField9 = "project budget"

myTemp = MsgBox("Attenzione la macro creerà tanti progetti quante sono
le righe del progetto attivo. Si desidera procedere?", vbYesNo,
"Conferma esecuzione macro")
If myTemp = vbNo Then End

'il master project è il progetto che contiene l'elenco dei progetti da
creare con i
'relativi campi custom da valorizzare. ogni attività del master
project rappresenta
'un progetto da creare.
Set oMasterProject = ActiveProject

For Each oTask In oMasterProject.Tasks

'il flag1 segnala se il progetto deve essere importato o meno
If oTask.Flag1 = True Then

szNewProjectName = oTask.Name

FileNew

Set oNewProject = ActiveProject

oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField1), oTask.Text1
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField2), oTask.Text2
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField3), oTask.Text3
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField4), oTask.Text4
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField5), oTask.Text5
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField6), oTask.Text6
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField7), oTask.Text7
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField8), oTask.Text8
oNewProject.ProjectSummaryTask.SetField
FieldNameToFieldConstant(szCustomField9), oTask.Text9

FileSaveAs Name:="<>\" & szNewProjectName, FormatID:=""
Publish True, "http://projectserver/PWA/" & szNewProjectName
FileCloseEx pjSave, , True

End If

Next oTask

End Sub
 
J

Jack Dahlgren

No, there is no other way to process a list of projects other than
programmatically.
There is no built-in method of creating more than one project from an excel
file.
If you have only one, then you can go to the file menu within project and
open the excel file. Assuming it is formatted correctly then you can map the
fields and it will be complete.

-Jack
 

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