Reputation: 53
i would like to start a new Visio instance out of excel and execute some code. This works well, but it takes about 100x times longer to execute the code than executing the code directly in a visio macro.
Visio 2003
Dim visio_app As New Visio.Application
Dim doc As Visio.Document, pg As Visio.page
Set doc = visio_app.Documents.Open(.......)
Set pg = visio_app.ActivePage
'Performance problem runing this methode
delete.doDeleteDeleted visio_app, pg
......
No Performance issue when i start the code directly in visio
delete.doDeleteDeleted Application, Application.ActivePage
does anybody knows how to fix it?
Thank you for your help!
Upvotes: 0
Views: 82
Reputation: 53
I already found a workaround. I created a visio file which includes the doDeleteDeleted methode and a run sub which executes doDeleteDeleted. Then I use visio_app.ExecuteLine(....) to execute the code in the Visio file. This works, but its unattractive
Upvotes: 1