Activate project for the first time by using VBA

Activate project for the first time by using VBA

uw
Advocate Advocate
589 Views
2 Replies
Message 1 of 3

Activate project for the first time by using VBA

uw
Advocate
Advocate

Hello.

 

I would like to activate a project file (*.ipj) by using VBA.

It is no problem to switch to a project I have allready used:

_______________________________________________

Public Sub ChangeProject()

    Dim oDesignProjectMgr As DesignProjectManager
    Set oDesignProjectMgr = ThisApplication.DesignProjectManager
    Dim oProject As DesignProject
    Set oProject = oDesignProjectMgr.DesignProjects.ItemByName("NewProjectName")
        oProject.Activate

End Sub

_______________________________________________

But how can I activate a new Project I have copied to my harddisk, renamed and never used before.

For example I want to set

        C:\tmp\NewestProject\NewestProject.ipj

as my active project?

 

Regards

 Reinhard

0 Likes
Accepted solutions (1)
590 Views
2 Replies
Replies (2)
Message 2 of 3

marcin_otręba
Advisor
Advisor
Accepted solution

Try:

Set oProject = oDesignProjectMgr.DesignProjects.AddExisting

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 3 of 3

uw
Advocate
Advocate

Thank you very, very much!!!

It works perfectly!

 

Regards

 Reinhard

0 Likes