A
Alex Sille
Hi there,
recently I had to finish an proj2007 addin and then convert it to its
msproj2003 equivalent. I'm a bit confused that there is no Activate event
for c#. (or at least I can't find any, and I could not find any useful info
abou this on the net either). I'm new to office developement so correct me
about some of my satetments below.
Does anybody out there have a good workaround for this? It a bit painful for
me, as I need to get some of the doc properties when a new project is opened,
so I can categoryze or handle the project the approperiate way. As it it
turned out that I can't get the custom properties at the NewFile event.
I'm using a dumb backgroundworker method now and waiting for the application.
ActiveProject.ID like :
------
MSProject.Project apj = this.Application.ActiveProject;
if (this.Application.ActiveProject != null)
{
if (this.Application.ActiveProject.ID == waitForId)
{
e.Result = true;
break;
}
}
------
but sometimes this leads to an exception with a message that the application
is busy while calling :
MSProject.Project apj = this.Application.ActiveProject;
So this is not the best solution ... Using a try catch block at the moment ..
..
Would be happy to see any other event that I could replace the Activate
event with. Or is there an other solution. Am I using the wrong office tools
or o2003PIA ?
And what's the meaning of this : "Project events do not occur when the
project is embedded in another document or application"
I tryed to use the ActivePane.Deactivate event, but It's not fireing, where
can I use this event if not in msProject. The Application object does not
have an Application.ActivePaneDeactivating or something like tat event.
Many thanks for any help on this ...
url:http://www.ureader.com/gp/1117-1.aspx
recently I had to finish an proj2007 addin and then convert it to its
msproj2003 equivalent. I'm a bit confused that there is no Activate event
for c#. (or at least I can't find any, and I could not find any useful info
abou this on the net either). I'm new to office developement so correct me
about some of my satetments below.
Does anybody out there have a good workaround for this? It a bit painful for
me, as I need to get some of the doc properties when a new project is opened,
so I can categoryze or handle the project the approperiate way. As it it
turned out that I can't get the custom properties at the NewFile event.
I'm using a dumb backgroundworker method now and waiting for the application.
ActiveProject.ID like :
------
MSProject.Project apj = this.Application.ActiveProject;
if (this.Application.ActiveProject != null)
{
if (this.Application.ActiveProject.ID == waitForId)
{
e.Result = true;
break;
}
}
------
but sometimes this leads to an exception with a message that the application
is busy while calling :
MSProject.Project apj = this.Application.ActiveProject;
So this is not the best solution ... Using a try catch block at the moment ..
..
Would be happy to see any other event that I could replace the Activate
event with. Or is there an other solution. Am I using the wrong office tools
or o2003PIA ?
And what's the meaning of this : "Project events do not occur when the
project is embedded in another document or application"
I tryed to use the ActivePane.Deactivate event, but It's not fireing, where
can I use this event if not in msProject. The Application object does not
have an Application.ActivePaneDeactivating or something like tat event.
Many thanks for any help on this ...
url:http://www.ureader.com/gp/1117-1.aspx