Creating a Microsoft Project Macro at runtime from VB.NET/C#

  • Thread starter Thread starter Hem Tripathi
  • Start date Start date
H

Hem Tripathi

Hi,

I wish to create a Microsoft Project Macro from a windows Forms
application(C# / VB.NET). I wish to know if I can do it. To make the
question more clear.. I have this windows forms application which has a
functionality whereby a user can edit a work breakdown structure which
is very similar to the WBS of Microsoft Project. Now a user can edit
this WBS in the application. There are lots of operations that can be
performed in it like Indenting, Adding/Deleting tasks, etc. All these
can change the Start and Finish dates of the tasks. Calculating these
dates was becoming a tedious task in our application so we decided to
use MS Project in the background to find these dates. So whenever a user
opens this Windows Form to edit the WBS in our application, I am
creating a mpp file in the background and adding tasks to it from our
database(the same tasks that are shown in our Windows Form). Now when a
user edits this WBS in the application, I make the same edit thru C#
automation code and retrieve the values from the mpp file and display it
in our Form. This does take some time as automation is slow. For a 500
tasks WBS,it takes about 1.5 seconds. I am trying to reduce this
duration and so thought of using Macros in MS Project. So I wish to know
that can I create Macros at runtime from my C# or VB.NET code. I would
appreciate any help in this regard.

Thanks,
Hem Tripathi
 
Back
Top