Items not saving to GLOBAL.mpt when copied using macro

Y

Y Davies

I have a file that I use to distribute some macros and a toolbar - when the
MPP file is opened, the On Open procedure copies the macros and toolbar to
the user’s global.mpt. This usually works a treat but recently I’ve seen
cases where the On Open procedure is run but none of the copying takes place.
The macros and toolbars can be copied using the Organiser OK, but that
requires the users to know how to do it and what to copy. Can anyone advise
why this might be the case? It seems to happen on recently installed versions
of MSP, is it something to do with the way it’s been installed?
Cheers.
 
J

John

Y Davies said:
I have a file that I use to distribute some macros and a toolbar - when the
MPP file is opened, the On Open procedure copies the macros and toolbar to
the user’s global.mpt. This usually works a treat but recently I’ve seen
cases where the On Open procedure is run but none of the copying takes place.
The macros and toolbars can be copied using the Organiser OK, but that
requires the users to know how to do it and what to copy. Can anyone advise
why this might be the case? It seems to happen on recently installed versions
of MSP, is it something to do with the way it’s been installed?
Cheers.

Y Davies,
The process you describe should work fine. It's the same process I used
years ago at the company where I worked.

The first question is, what version of Project are you using, including
any updates? Any other info about your setup configuration would also be
helpful.

Have you tried stepping through the macro to see where it might be
failing? Inserting a Stop statement is a good way to halt execution on
an auto-run type event macro so you can single step through the rest of
the code.

By the way, since this question relates to Project VBA, it really should
be posted in our developer newsgroup
(microsoft.public.project.developer). This newsgroup is for general
questions/issues with Project.

John
Project MVP
 
Y

Y Davies

John,

I am using Project Standard 2003 SP1. I have used the Stop function to find
out what was going on - it looks like the OrganiserMoveItem function is
working fine but it's not actually doing anything, although doing it manually
using the Organiser is fine... I wondered if it was anything to do with user
update rights. Maybe I'll just re-install it...

I've posted this question now on the Developer page, sorry for the mix up.

Cheers,

Yvonne
 
D

Dean C

I think the problem you are having is that OrganizerMoveItem is not
overwriting renamed fields. Replace pjTaskDuration2 in the code below with
the constant for the field you're replacing before you run OrganizerMoveItem.

CustomFieldRename FieldID:=pjTaskDuration2, NewName:=""
 

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