473,586 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creaing an instance of MSProject.Proje ct in VB .Net

(Type your message here)

Hi,
I am trying to create a MSProject.Proje ct object instance in VB .Net.
this is the code I am using

/*************** *************** *************** *************** *************** **/
Private Sub Button2_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button2.Click
line 1: Dim p As Object
line 2: Dim p1 As MSProject.Proje ct
line 3: p = CreateObject("M SProject.Projec t")
line 4: p.Application.F ileNew()
line 5: p1 = CType(p, MSProject.Proje ct)
line 6: p1.Tasks.Add("t est task on 21.04.2004")

line 7 : p1.SaveAs("d:\t emp\testx.mpp", MSProject.PjFil eFormat.pjMPP)
End Sub
/*************** *************** *************** *************** ***************/

I am trying to run the project and click the button i am getting the following exception at line 3
/*************** *************** *************** *************** *******/
An unhandled exception of type 'System.Runtime .InteropService s.COMException' occurred in sample2.exe
Additional information: COM object with CLSID {1019A320-508A-11CF-A49D-00AA00574C74} is either not valid or not registered.
/*************** *************** *************** *************** *******/

Please help for the above mention problem
--------------------------------
From: Prakash V

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>hKUyWS/Xz0aJsPLXTutm2A ==</Id>
Nov 18 '05 #1
0 1150

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
597
by: kon george | last post by:
Can somebody assist. I build this code on a dev laptop and copied across the entire code to a Windows 2003 server with 1.1 framework. It is basic ASP.NE T that uses web service for SQL Server 2000 DB access. The code works fine on my dev laptop, just not on the non dev machine. Here is the full error page:
2
3206
by: Seth | last post by:
Hi all, I am trying to get MS Project to create and save data back to DB2 via the IBM ODBC driver. Both MSSQL and Oracle work, but when saving back to DB2 it crashes leaving the DB with only 3/4 of the tables created. Has anyone had experience with this system configuration ? If not, could anyone suggest some data migration tools so I...
0
1035
by: Matt Harp | last post by:
I created a new Add-In project, and added a reference to the MSProject 11.0 Object Lib and everything compiles fine, until I try to access the Interop namespace. for this... using Microsoft.Office.Interop; I get this...
0
887
by: bacchus | last post by:
i am converting a solution from vs2003 to vs 2005 and i need "interop.ms project.dll" or anything that can refrence msproject because this is the error i am getting when trying to build the application . error:The type or namespace name 'Interop' could not be found (are you missing a using directive or an assembly reference?). any help is...
0
939
by: mfleet1973 | last post by:
Hi Gang. Is it possible to export/import data from/to MsProject? If it is, can someone please guide me in the right direction? Thanks a lot! Mike.
0
2336
by: pankajprakash | last post by:
as i run the my web application it occurs the following error "Could not load file or assembly 'Microsoft.Office.Interop.MSProject, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. D:\Projects\TRMS\TRMS_SQL\TRMS32\Web.config" would you tell me how i can...
2
1007
suryasreepada
by: suryasreepada | last post by:
I have been searching for tools required develop MSProject 2007 Add-in. But I did not find any tools for this. Please help me by providing any simple samples and What are the tools required to install. Please provide me Download links for required Tools to be installed. Any help appriciated.
0
1003
by: ansu832001 | last post by:
Hi All, I have a requirement to Export a DataTable to MPP which i have achieved partially,my main concern in this process is *TIME TAKEN* for export, I have a DataTable with 1500 rows which i have to export and to my shock it has taken 8 minutes to export this to MPP which is UNACCEPTABLE ,iam unable to solve this, need help, Iam using...
10
3996
by: =?Utf-8?B?SGVyYg==?= | last post by:
In trying to write VB.Net code to control MSProject 2003 it was recommended that I record a macro in MSProject and transfer the code to VB.Net. When recording the FileSaveAs (to the project server) I get the following: FileSaveAs(Name:="<>\MyProject.Published", UserID:="", DatabasePassWord:="", FormatID:="") However, this gives me the...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.