ms-project

Example of MPXJ library in C#

喜夏-厌秋 提交于 2019-12-10 20:04:18
问题 I'm having a heckuva time finding any C# code examples using the MPXJ library when connecting to a Microsoft Project file. Can someone please post a snippet demonstrating how to write the contents of a table in an .mpp file to screen? Bonus points for any links/references! Thanks! ~Dan 回答1: hopefully this will help. First you need to open your project file: ProjectReader reader = ProjectReaderUtility.getProjectReader(inputFile); ProjectFile projectFile = reader.read(inputFile); This assumes

how to copy tasks data from Microsoft Project Plan to excel?

非 Y 不嫁゛ 提交于 2019-12-08 11:58:35
问题 '~~> Code to open MPP file in Excel Sub Sample() Dim appProj As MSProject.Application Dim aProg As MSProject.Project Dim wb As Workbook Dim ws As Worksheet Set wb = ActiveWorkbook '~~> This is the Sheet Where you want the data to be copied Set ws = wb.Sheets("Sheet1") Set appProj = CreateObject("Msproject.Application") '~~> This is a MS Project File. Change path as applicable. appProj.FileOpen "C:\MS Project.mpp" Set aProg = appProj.ActiveProject appProj.Visible = True '~~> Now you have the

MS Project to Excel Gantt Chart using VBA

痴心易碎 提交于 2019-12-06 10:15:22
问题 I'm trying to export some tasks from MS Project to Excel using a VBA script in Project. So far I am able to export the data I want with no issue and it opens in Excel just fine. What I'm trying to do now is take that data in Excel and replicate into a Gantt chart similar to the one in Project. I know I know, what's the point of going through all this just to get a Gantt chart in Excel when I already have one in Project right? Well among other things this Excel gantt chart is being made so

How to Import Excel Worksheet into Microsoft Project?

我的梦境 提交于 2019-12-06 00:33:13
I want to import the following Microsoft Excel worksheet into Microsoft Project (2010): Essentially, the worksheet has tasks and subtasks in column A, Start Dates in column B, and Finish Dates in column C. The conditional highlighting you see is based off the start and finish dates. There are no macros, only formulas, so the spreadsheet is saved as a normal Excel workbook. I tried to open the workbook in Project. It correctly finds the source worksheet name, but it doesn't recognize any fields to map to. See the picture below: What can I do to resolve this? I've never used Project before, but

MS Project to Excel Gantt Chart using VBA

六月ゝ 毕业季﹏ 提交于 2019-12-04 16:42:27
I'm trying to export some tasks from MS Project to Excel using a VBA script in Project. So far I am able to export the data I want with no issue and it opens in Excel just fine. What I'm trying to do now is take that data in Excel and replicate into a Gantt chart similar to the one in Project. I know I know, what's the point of going through all this just to get a Gantt chart in Excel when I already have one in Project right? Well among other things this Excel gantt chart is being made so that everyone without MS Project can view the scheduled tasks without having MS Project. So what I've

Loop through each field for MS Project

假装没事ソ 提交于 2019-12-04 04:51:07
问题 I am trying to loop through each field in my MS Project file and gather information about that field (custom name is particular). What is the easiest way to do this? Thanks 回答1: To get the custom name of a field you'll need the field constant and to loop through all fields, you'll need to store a list of all field constants. Here is a simple example to get you started. I hard-coded an array of the field constants for the Task Text1-30 fields. Sub GetCustomFieldNames() Dim TextFields As

Programmatically access a Microsoft Project (MPP) file from C#

天大地大妈咪最大 提交于 2019-12-03 19:00:50
问题 What are my options for programmatically accessing a Microsoft Project file? What are the pros and cons of each approach? I will basically need to import all data from the file into another data structure. Using the Office Interop assembies is low on the preference scale. 回答1: Here are the options: Interop (messy and horribly slow for large projects) Save project in XML and work with it (messy) Save project in the database (that's not publishing and it is available for project 2003 only - see

Remove a node from XML file in MS Project VBA [closed]

此生再无相见时 提交于 2019-12-02 22:46:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I’d like to remove a node from my xml file using VBA in MS Project 2007 . Should be so easy but I can’t get it running. Here is my XML <config id="config" ConfigSaveDate="2011-03-31 21:32:55" ConfigSchemaVersion="1.02"> <Custom> </Custom> <Program> <DateFormat>yyyy-mm-dd hh:mm:ss</DateFormat> </Program>

Update VBA code module in distributed MS Project global.mpt files

让人想犯罪 __ 提交于 2019-12-02 17:23:27
问题 I am responsible to modify the Global file of MS Project. It contains a custom made module which is constantly updated. I am distributing it to other users which do not have the computer skills to update their own file (I know it's just copy paste). I would like to know if there is a way I can code something in the Global file which checks for the latest version that is stored on a shared drive and copies and pastes in the other users computers? 回答1: Use the Project_Open event in the

Remove a node from XML file in MS Project VBA [closed]

巧了我就是萌 提交于 2019-12-02 13:14:19
I’d like to remove a node from my xml file using VBA in MS Project 2007 . Should be so easy but I can’t get it running. Here is my XML <config id="config" ConfigSaveDate="2011-03-31 21:32:55" ConfigSchemaVersion="1.02"> <Custom> </Custom> <Program> <DateFormat>yyyy-mm-dd hh:mm:ss</DateFormat> </Program> <ProjectFile ProjectFileName="projectfile1.mpp"> <RevisionNumber>201</RevisionNumber> <FileName>projectfile1.mpp</FileName> <LastSaveDate>2011-03-23 16:45:19</LastSaveDate> </ProjectFile> <ProjectFile ProjectFileName="projectfile2bedeleted.mpp"> <RevisionNumber>115</RevisionNumber> <FileName