Friday, April 17, 2020

MS Project Automation

Add reference to:
  • Microsoft Office Project 16 Object Library.
Imports Microsoft.Office.Interop

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim pjApp As New MSProject.Application
        pjApp = New MSProject.Application
        pjApp.Visible = True
        pjApp.ActiveProject.Tasks.Add("Wind clocks")
        MsgBox("about to close project")
    End Sub

End Class

No comments:

Post a Comment

C# Creating a Picture at Runtime in a windows form app

Add a PictureBox to the form. It will be called PictureBox1 See post: