OrganizerMoveItem

M

Mark

Example vba code:

OrganizerMoveItem Type:=9, FileName:="MSPOrganise.mpp",
ToFileName:="Global.MPT", Name:="MyCost (Cost)"

The problem here is, if someone else wants to use the above code they will
need to change the word Cost to their own language. Is there anyway to get
around this to specify the internal name of the field which is
pjCustomTaskCost1?

Mark
 
J

John

Mark said:
Example vba code:

OrganizerMoveItem Type:=9, FileName:="MSPOrganise.mpp",
ToFileName:="Global.MPT", Name:="MyCost (Cost)"

The problem here is, if someone else wants to use the above code they will
need to change the word Cost to their own language. Is there anyway to get
around this to specify the internal name of the field which is
pjCustomTaskCost1?

Mark

Mark,
Why not use the simple direct approach? When using VBA in Project, most
of the syntax arguments can be identified by their generic name. In
other words, regardless of what name the user may give to a spare
(custom) field, VBA still recognizes the field by its generic name. So
your code line should be:
OrganizerMoveItem Type:=pjfields, FileName"="MSPOrganise.mpp",
ToFileName:="Global.mpt", Name:="Cost1"

Note that I also use the descriptive constant for the type. Using the
actual constant value works fine also but the descriptive value makes
the code easier to understand and interpret.

Hope this helps.
John
Project MVP
 

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