Getting the "All Tasks" Filter

B

billb

The plugin I've written relies on the All Tasks filter. I just had a user
from Germany report an error and I believe it's because "All Tasks" may not
be called "All Tasks" in the German version.

Is there a way to reliably obtain that filter regardless of language short
from installing it myself?

Thank you.
 
R

Rod Gill

The FilterApply method requires a filter name as a string. So, you have two
alternatives:

1) Provide a text file for translations: In it would be lines that say:
[German]
"All Tasks", "Foreign Language Name"
Now use the text file to get the correct name to use.

2) Always create Filters and Tables etc programmatically when you need them.
Your code would create a "All Tasks" filter. You might only do this if an
error is triggered. runtime error 1101 is Filter cannot be found. You do not
need to show newly created filters in the Project Menu. In fact it may be
more reliable to create new filters for your app anyway (EG "myApp All
Tasks") in case end users have edited filters and tables you need in ways
that might break your plugin.
--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 

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