Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My first steps here, so hope I'm doing everything correct... (btw, Dutch, so sorry for the poor English...)
Is it possible to create/use a VB (Visual Stusio 2010) program that uses Ms-project files/objects via the Visual Studio 2010 Tools for Office-runtime. The end user doesn't have the program Ms-project installed on his PC but needs to change basic information in the .mpp file.

What I have tried:

It works when I test it on my develop PC (has Ms-project program) but after deploy (ClickOnce application) on the end user PC (without Ms-project program), I get an error.
Posted
Updated 31-Oct-19 10:12am
Comments
RickZeeland 30-Oct-19 15:33pm    
Can you provide the error message ?
My first guess is missing dll's or having no administrator rights.
Ronorono 31-Oct-19 15:52pm    
I have a prt scr, but don't know how to attach here... It's indeed a dll error, but my guess is that the runtime doesn't support or work with MS-project...
short : "COM-classfactory CLSID {36D27C48-A1E8-11D3-BA55-00C04F72F325} has failed... error 80040154"

No. The "tools for Office" let you write applications which use the existing installation of Office. If the user doesn't have Office, or the relevant Office application, installed then your code will not work.

There are some alternative solutions which might work for you. For example:
MPXJ – Introduction[^]
 
Share this answer
 
Comments
Ronorono 30-Oct-19 15:49pm    
Ok, what is then the use of the office runtime library. I mean to remember that I used it in the past (VB6) to use an Access database without the end-user having the program Access (so also via the office runtime)
Richard Deeming 31-Oct-19 16:01pm    
As Dave explained below, the Office runtime library is required in addition to the Office applications.

It has no connection to the Access runtime library, which allows your code to work with an Access database without installing Access.
Ronorono 30-Oct-19 16:00pm    
Ok, but what is then the purpose of the office runtime library in VS.
If I read correct from Microsoft website : "This download installs the Visual Studio 2010 Tools for Office Runtime, which is required to run Microsoft Office based solutions built using Microsoft Visual Studio 2010, 2012, 2013 and 2015."
Ronorono 31-Oct-19 15:42pm    
Thanks for the alternative but with the 'MPXJ – Introduction' I can't write to the MPP file.
Richard Deeming 31-Oct-19 16:05pm    
Not really surprising, since MPP is Microsoft's proprietary file format. You'll either need to save the files as MSPDI; find an alternative library which supports writing MPP files; or install Project on the computer where your code will be running.
See answer here: ClickOnce Publish is missing references to com interop - Developer Community[^]

The error message could also be WINPROJ.exe related, see answer here: Retrieving the COM class factory for component with CLSID {36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80080005 | The ASP.NET Forums[^]
I suspect that it might be a rights problem, as you do a ClickOnce installation (no administrator rights).
I would recommend to try to test your application without ClickOnce and running as administrator.
But as Richard Deeming said, it may just be because the Office software is not installed.
 
Share this answer
 
v3
Ok, but what is then the purpose of the office runtime library in VS.
If I read correct from Microsoft website : "This download installs the Visual Studio 2010 Tools for Office Runtime, which is required to run Microsoft Office based solutions built using Microsoft Visual Studio 2010, 2012, 2013 and 2015."
 
Share this answer
 
Comments
Dave Kreskowiak 30-Oct-19 18:08pm    
You posted this as an answer to your own question, not in response to Richard.

It's the runtime for the Office Tools library, not for any of the Office applications. If the application you are writing uses "Visual Studio Tools for Office", then you need to install that runtime in order for your application to run, ON TOP OF HAVING OFFICE INSTALLED.
Ronorono 31-Oct-19 15:36pm    
I know, but yesterday this website was acting weird...

For what exactly can I use this "Office tools library" if its not for application or file handling ?
There used to be a runtime for MS-Access, so you can used the database for data storage without having office installed on the end user pc...(VB6)
Dave Kreskowiak 31-Oct-19 16:28pm    
Visual Studio Tools for Office is used for creating plug-ins and add-ins for the Office applications.

The Access Runtime was a bit misnamed. It was a database driver set for Access databases and Excel workbooks. It didn't really let you edit the files in the same way you could in those applications, but it let you treat them as databases for applications.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900