Custom View Filter Macro

S

SpiroT

I need some help writing this macro...

Within a specific MS Project file, when I choose certain views, I would like
to I would like the macro to:

1) Temporarily suspend the filter of the incomming view (ie., apply 'no
filter')
2) Do a "Show All" outline levels,
3) then go ahead and apply the filter for the incomming view.

The reason I need this functionality is because I have created several
custom views with filters, but I run in to the problem that when the user
switches to another custom view we do not see all tasks because the user has
collapsed some of the summary tasks while on the previous view.

Any help would be appreciated.

/ST.
 
J

Jan De Messemaeker

Hi,

Sub TheRequest()
viewapply "Your view"
Filterapply "All Tasks"
Outlineshowalltasks
viewapply "Your view"
end sub

HTH
 
S

SpiroT

Hi Jan

Thank you...I ended up using your code to attach to toolbar buttons... works
great!

I was wondering however if an event can be written to catch the view changes
and then perform these actions?

/ST
 
J

Jan De Messemaeker

Hoi,

I'm not a big event user but my object browser tells me there is an
application event called
WindowBeforeViewChange
Its help also has a link to
Using events with the application object.
Hope this helps,
 

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