View Full Version : How can I open and read a MPP file without MS Project on the desktop.


stuart.trahan@forProject.com
06-03-2007, 04:27 AM
I know this can be done because there is a myriad of 3rd Party MSP
Viewers out there that read MPP files without MS Project being
installed. We tried using Primery Interop Assembly (PIA) and it
worked if a MS Office component was installed on the machine even
though MSP was not ... but as soon as we did the same on a FRESH
machine without Office of MSP installed we got an error when trying to
access the MPP file that said "Please install the Microsoft Office
component" ... So, what I am asking is for any info someone can
provide that will give me insight on how to read an MPP file without
Microsoft Office or MS Project installed? Thanks for anything that
can be provided.

Stuart

Rod Gill
06-03-2007, 08:28 AM
From a license perspective you have to have Project installed, even if you
use oledb to read the .mdb file.

However, if projects are stored in a database (Access SQL Server etc) then
you do not need Project to read the database. You can also save your project
as an xml file and read that.

--

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


----------------------------------------------------------------------------------------------------


<stuart.trahan@forProject.com> wrote in message
news:1180841276.354037.177810@q75g2000hsh.googlegroups.com...
>I know this can be done because there is a myriad of 3rd Party MSP
> Viewers out there that read MPP files without MS Project being
> installed. We tried using Primery Interop Assembly (PIA) and it
> worked if a MS Office component was installed on the machine even
> though MSP was not ... but as soon as we did the same on a FRESH
> machine without Office of MSP installed we got an error when trying to
> access the MPP file that said "Please install the Microsoft Office
> component" ... So, what I am asking is for any info someone can
> provide that will give me insight on how to read an MPP file without
> Microsoft Office or MS Project installed? Thanks for anything that
> can be provided.
>
> Stuart
>

Mike Glen
06-03-2007, 09:50 AM
Hi Stuart,

Welcome to this Microsoft Project newsgroup :-)

Companion Products on our Project MVP website list 3rd party viewers, and
you might like also to see FAQ Item: 16. Project Viewer. Programs like the
Housatonic viewer allow you to see your project in HTML as if on a web page
and doesn't need Office.

FAQs, companion products and other useful Project information can be seen at
this web address:http://project.mvps.org/faqs.htm

See http://tinyurl.com/2xbhc for Project Tutorials

Hope this helps - please let us know how you get on :-)

Mike Glen
Project MVP


<stuart.trahan@forProject.com> wrote in message
news:1180841276.354037.177810@q75g2000hsh.googlegroups.com...
>I know this can be done because there is a myriad of 3rd Party MSP
> Viewers out there that read MPP files without MS Project being
> installed. We tried using Primery Interop Assembly (PIA) and it
> worked if a MS Office component was installed on the machine even
> though MSP was not ... but as soon as we did the same on a FRESH
> machine without Office of MSP installed we got an error when trying to
> access the MPP file that said "Please install the Microsoft Office
> component" ... So, what I am asking is for any info someone can
> provide that will give me insight on how to read an MPP file without
> Microsoft Office or MS Project installed? Thanks for anything that
> can be provided.
>
> Stuart
>

Adrian
06-03-2007, 10:39 AM
If you are using Project Server 2007 there are two things to be aware of :-

1) You will HAVE to go through the PSI to communicate with Project Server
in any capacity.

2) Any user using this method MUST be appropriately licenced (that is
they will need a Project Server CAL) to access the data. (Same applies in
2003, although you can access the PS DB without usuing PDS in 2003, although
it is not recommended).

Regards

Adrian.

<stuart.trahan@forProject.com> wrote in message
news:1180841276.354037.177810@q75g2000hsh.googlegroups.com...
>I know this can be done because there is a myriad of 3rd Party MSP
> Viewers out there that read MPP files without MS Project being
> installed. We tried using Primery Interop Assembly (PIA) and it
> worked if a MS Office component was installed on the machine even
> though MSP was not ... but as soon as we did the same on a FRESH
> machine without Office of MSP installed we got an error when trying to
> access the MPP file that said "Please install the Microsoft Office
> component" ... So, what I am asking is for any info someone can
> provide that will give me insight on how to read an MPP file without
> Microsoft Office or MS Project installed? Thanks for anything that
> can be provided.
>
> Stuart
>

John
06-05-2007, 10:51 AM
Private Sub Command1_Click()
Dim rstMpp
Dim sSQLMpp
Dim sConnMpp
'Dim dbcon
'Dim DSN
'Dim UID
'Dim UIp
Dim iCnt As Integer

sFileName = "C:\Documents and Settings\Admin\My Documents\mpp2.mpp"

sConnMpp = "Provider=Microsoft.Project.OLEDB.11.0;Project Name=" & sFileName & ";"

' Shorter Query
sSQLMpp = "SELECT TaskId, TaskName, TaskStart, TaskFinish, TaskOutlineLevel, TaskOutlineNumber from Tasks"


sSQLMpp = "SELECT * from Tasks"

Set rstMpp = CreateObject("ADODB.Recordset")
rstMpp.Open sSQLMpp, sConnMpp
rstMpp.MoveFirst

Do While Not rstMpp.EOF

' Bits I'm interested in
Debug.Print "---------------------------------------------"
Debug.Print "TaskId " & rstMpp("TaskId")
Debug.Print "TaskName " & rstMpp("TaskName")
Debug.Print "TaskStart " & rstMpp("TaskStart")
Debug.Print "TaskFinish " & rstMpp("TaskFinish")
Debug.Print "TaskOutlineLevel " & rstMpp("TaskOutlineLevel")
Debug.Print "TaskOutlineNumber " & rstMpp("TaskOutlineNumber")
Debug.Print vbCrLf


' Everything
For iCnt = 1 To 318
Debug.Print rstMpp(iCnt).Name & " " & rstMpp(iCnt)
Next iCnt
Debug.Print "---------------------------------------------"
Debug.Print vbCrLf & vbCrLf & vbCrLf & vbCrLf

rstMpp.MoveNext
Loop
rstMpp.Close

End Sub


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Rod Gill
06-06-2007, 09:04 AM
I don't think the oledb driver is free, you still need a copy of Project
installed as a license for it.
--

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


----------------------------------------------------------------------------------------------------


<John> wrote in message news:20076555138john@withers.net...
> Private Sub Command1_Click()
> Dim rstMpp
> Dim sSQLMpp
> Dim sConnMpp
> 'Dim dbcon
> 'Dim DSN
> 'Dim UID
> 'Dim UIp
> Dim iCnt As Integer
>
> sFileName = "C:\Documents and Settings\Admin\My Documents\mpp2.mpp"
>
> sConnMpp = "Provider=Microsoft.Project.OLEDB.11.0;Project Name=" &
> sFileName & ";"
>
> ' Shorter Query
> sSQLMpp = "SELECT TaskId, TaskName, TaskStart, TaskFinish,
> TaskOutlineLevel, TaskOutlineNumber from Tasks"
>
>
> sSQLMpp = "SELECT * from Tasks"
>
> Set rstMpp = CreateObject("ADODB.Recordset")
> rstMpp.Open sSQLMpp, sConnMpp
> rstMpp.MoveFirst
>
> Do While Not rstMpp.EOF
>
> ' Bits I'm interested in
> Debug.Print "---------------------------------------------"
> Debug.Print "TaskId " & rstMpp("TaskId")
> Debug.Print "TaskName " & rstMpp("TaskName")
> Debug.Print "TaskStart " & rstMpp("TaskStart")
> Debug.Print "TaskFinish " & rstMpp("TaskFinish")
> Debug.Print "TaskOutlineLevel " & rstMpp("TaskOutlineLevel")
> Debug.Print "TaskOutlineNumber " & rstMpp("TaskOutlineNumber")
> Debug.Print vbCrLf
>
>
> ' Everything
> For iCnt = 1 To 318
> Debug.Print rstMpp(iCnt).Name & " " & rstMpp(iCnt)
> Next iCnt
> Debug.Print "---------------------------------------------"
> Debug.Print vbCrLf & vbCrLf & vbCrLf & vbCrLf
>
> rstMpp.MoveNext
> Loop
> rstMpp.Close
>
> End Sub
>
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com

John Withers
06-12-2007, 09:55 AM
Agreed. You would have to purchase a copy of Project, however the only files you need on the server are those that get installed in..

C:\Program Files\Common Files\Microsoft Shared\Microsoft Office Project 11\

(PJOLEDB.DLL etc)

And the registry settings to go with them. (5 or 6 small sections)

John

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

stuart.trahan@forProject.com
07-03-2007, 01:27 PM
On Jun 12, 1:55 pm, John Withers wrote:
> Agreed. You would have to purchase a copy ofProject, however the onlyfilesyou need on the server are those that get installed in..
>
> C:\ProgramFiles\CommonFiles\Microsoft Shared\Microsoft OfficeProject11\
>
> (PJOLEDB.DLL etc)
>
> And the registry settings to go with them. (5 or 6 small sections)
>
> John
>
> EggHeadCafe.com - .NET Developer Portal of Choicehttp://www.eggheadcafe.com

Thank you John ... first let me applogize for not responding to your
reply quickly as I've been out of the country for the last three weeks
and am just getting back to this issue. Let me say your insight
makes a lot of sense. I have a couple of subsequent questions around
this if you could kindly expand on them a little ...

1. are you saying that we need all the files in that directory and an
accompanying registry settings for each or, can I be selective and
just use the PJOLEDB.DLL if all I am doing is trying to READ the MSP
data?

2. How would you find the registry settings? Is it as simple as
seaching the registry for the DLLs found in the C:\ProgramFiles
\CommonFiles\Microsoft Shared\Microsoft OfficeProject11\ directory ...
or is there a special place in the registry you could point me to?

3. Do you know id OleDB is supported in 2007?

Thanks