Select a specific page in the left side pane of MS Project

D

dotnet-force

Hi

I'm developping a addin for MS Project 2002 in C#.

When I click on my button, I want to display with some code a specific
page in the left side pane of MS Project.

For example, I want to display the 'Define the Project' html page.
So I checked in the GuideSchema.xml file the GoalAreaID for the Tasks
which is 1, and the TaskID for the page that I want to display which is
1 too.

But the MS Project 2002, I didn't find some API to change the HTML page.

I'm able to change the highlight in the Project Guide toolbar to the
'Tasks' button with Application.GoalAreaHighlight(1) method, but the
html doesn't change. And then I don't know how to select the 'Define the
Project' page.

I would like something like :
Application.SetGoalArea(1); // argument is the <GoalAreaID>
Application.SetGoalAreaTask(1); // argument is the <TaskID>

If you have some ideas, you are welcome.

Here is a part of the default GuideSchema.xml file :
<GoalArea>
<GoalAreaID> 1 </GoalAreaID>
<GoalAreaName> Tasks </GoalAreaName>
<GoalAreaDescription>Plan and schedule your project's tasks by
clicking an item below. Clicking an item displays tools and instructions
for completing that step.</GoalAreaDescription>
<URL> gbui://tasks_main.htm </URL>
<RelevantViews>
<ViewType> 0 </ViewType>
</RelevantViews>

<GoalAreaTask>
<TaskID> 1 </TaskID>
<Title> Define the Project </Title>
<TaskName> Define the project </TaskName>
<URL> gbui://define_project.htm </URL>
<RelevantViews>
<ViewType> -1 </ViewType>
</RelevantViews>
</GoalAreaTask>

Pascal Lenormand
ILOG
 
W

Wei-Dong Xu [MSFT]

Hi Pascal,

Thanks for participating the community!

Currentlly we are performing some research on this problem, and we will reply you ASAP if we get any results!

Have a nice day!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei-Dong Xu [MSFT]

Hi Pascal,

From your description, you are going to customize the project interface.

Based on my research, Adding customized sidepanes to the Project Guide needs a three-step process:
1) Create the sidepane interface as an HTML page.
2) Bind script to its controls and event handlers to handle any communication with the Project object.
3) Plug the results into the goal area framework so users can find them.

For your convenience, I'd suggest the MSDN article "Customizing the Microsoft Project Guide" will introduce more information for you regarding this.
This guide also contians one sample for you.
http://msdn.microsoft.com/library/e...izing_the_Project_Guide_3333.asp?frame=true#1

Please feel free to let me know, if you have any further question.

Have a nice day!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

dotnet-force

Hi

Thank for your answer and article but I already did what is described in
this article.

I already have my entry in the goal area 1 (i.e. 'Task'). Let's call
this entry 'My entry'. So when in click in the 'Task' goal area, the
html page contains a link 'My entry' and when I click on it, my html
page is displayed.

Now I added a button in my own toolbar and when I click on this button,
I want to directly display my html page without displaying the 'Task'
html page.
Here is the code of the event handler for my button:
public void
MenuItemClick(MSOffice.CommandBarButton control, ref bool Cancel) {
_application.GoalAreaChange(1);
}

This code change the default goal area to the 'Task' goal area. This
page contains the 'My entry' link but I have to click on this link to
display my page. So I want an API to change the goal area task to my
task area ID

Something like GoalAreaTaskChange(TaskID)

Could you tell me what the GoalAreaTaskHighlight(TaskID) function of the
Application object is doing?

Thanks for your help.

Pascal Lenormand
ILOG
 
W

Wei-Dong Xu [MSFT]

Hi Pascal,

Thanks for more information on this issue! I'd suggest you can try the method SidepaneTaskChange to change the Task. You can test the function
below to change the default project guide.
'Code begin ----------------------------------------------------
Sub ShowTask()

'Go to the Task page
Call Application.GoalAreaChange(1)
'the ID is "Task ID"
SidepaneTaskChange ID:=5
SidepaneTaskChange ID:=9
SidepaneTaskChange ID:=6

End Sub
'Code end ------------------------------------------------------

From my test, the GoalAreaTaskHighlight method will change to each task with the ID very fluently. If all the two methods help nothing on your issue,
I'd suggest you can create one demo project with repro steps and the scenario information (OS, project version etc). Then mail it to me. I will test
this for you. My email address is: (e-mail address removed) (please remove "online" which is added for avoiding the spam ).

Best regards,

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

dotnet-force

Thanks for your answer, it's exactly what I need.
I didn't see the method SidepaneTaskChange in the application.

Thanks for your help.
Pascal Lenormand
ILOG
 
W

Wei-Dong Xu [MSFT]

Hi Pascal,

That's a great news! :) You are very welcome!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top