J
john.talbot
I have been coding some macros to run in MS Project 2003 that works
fine when run under English language version but when used by a user in
say France using the French MUI option fails miserably.
I have a work around for:
ViewApply Name:="Resource Table", singlepane:=True
By seraching for a view with right screen attribute eg
' Get first resource table view
For Each viewObject In myproj.ViewsSingle
If viewObject.Screen = pjResourceSheet Then
ResViewName = viewObject.Name
Debug.Print "ResTab", ResViewName
Exit For
End If
Next viewObject
ViewApply Name:=ResViewName, singlepane:=True
But now have run into the problem of:
projapp.SelectTaskField Row:=1, Column:="Unique ID"
which crashes with Invalid attribute when in French etc
I have found that each field has a "UniqueID" value that has a
corresponding Symbolic constant in VBA eg
For Task Usage view:
Filed aclled "ID" is 188743703 = pjTaskID
etc
But there does not seem to be a way of translating the number to the
current Name requied in
Does any one have a either
a) a way of selecting the filed by this UID or
b)a table that lists all the built in fields (visible and Hidden) for
the Resource Table and the Task Uasge table for other languages so that
I can do something like:
Lang_Name = Application.LanguageSettings.LanguageID( msoLanguageIDUI )
Vlookup( etc)
to get the field name for current language.
I have tried 6 search engines and several Groups but have drawn blank
so far.
Seems to be a deficiency in MS Project VBA design to me will it improve
in 2007 version?.
fine when run under English language version but when used by a user in
say France using the French MUI option fails miserably.
I have a work around for:
ViewApply Name:="Resource Table", singlepane:=True
By seraching for a view with right screen attribute eg
' Get first resource table view
For Each viewObject In myproj.ViewsSingle
If viewObject.Screen = pjResourceSheet Then
ResViewName = viewObject.Name
Debug.Print "ResTab", ResViewName
Exit For
End If
Next viewObject
ViewApply Name:=ResViewName, singlepane:=True
But now have run into the problem of:
projapp.SelectTaskField Row:=1, Column:="Unique ID"
which crashes with Invalid attribute when in French etc
I have found that each field has a "UniqueID" value that has a
corresponding Symbolic constant in VBA eg
For Task Usage view:
Filed aclled "ID" is 188743703 = pjTaskID
etc
But there does not seem to be a way of translating the number to the
current Name requied in
Does any one have a either
a) a way of selecting the filed by this UID or
b)a table that lists all the built in fields (visible and Hidden) for
the Resource Table and the Task Uasge table for other languages so that
I can do something like:
Lang_Name = Application.LanguageSettings.LanguageID( msoLanguageIDUI )
Vlookup( etc)
to get the field name for current language.
I have tried 6 search engines and several Groups but have drawn blank
so far.
Seems to be a deficiency in MS Project VBA design to me will it improve
in 2007 version?.