
' Define a list to put the tasks into Dim tasks As ArrayList = New ArrayList ' Get the active project in the file Dim project As .Project _ ProjectApplication.FileOpenEx(filename, mv, mv, ''' ''' Get all task in a MS Project file ''' ''' Path to the MS project file ''' Name of GuiXT longtext variable ''' ''' empty string if success, errortext otherwise Public Function GetTasks(filename As String, output As String) As String Dim returnText As String = "" Try 'Create the Application object to interact with MS project Dim projectApplication As .Application = New .Application()ĭim mv As Object = The InputScript from above just slightly changes: The JavaScript call is replaced by a call to the function in the guixt_office.dll file: Guixt.Set(outtab, JSON.stringify(tasksArray)) When "createTab" is used in GuiXT, you can easily // put the data in JSON notation into the table Tend = tend.getDay() + "." + tend.getMonth() Tstart = tstart.getDay() + "." + tstart.getMonth() Create a new task object var tstart = new Date(em().Start)

This is the target list for GuiXT var tasksArray =

We want to go through all the elements in the list var tasks = new Enumerator(proj.Tasks) MS.Visible = true var proj = MS.ActiveProject Create MS Project connection and open the file var MS = guixt.CreateObject( "MSProject.Application")
