Automating FileSaveAs to Project Server

G

Gizmo Gizmo

Hi,
have a VBA script that imports assignments from a xls-file. To get right
rates for resources I save the project to Project Server and then
recalculates costs with the obtained rates.

When the project is about to be saved to Project Server I got a dialog that
says:
"The local resource XXX has the same name as an enterprise resource. The
name must be changed before project can be saved"

I've then the option to replace all local resources with enterprise
resources from pool which is exactly what I want to achieve. And this is
always true everytime I run the VBA code! Problem is that I want this to be
automated without need to interact with Professional.

Is there a way to achieve this wanted behavior when saving to server? I've
found the metod "EnterpriseResourceGet()" that I think could be used before
saving the project and thus get around having to interact. But the meaning of
the arguments that has to be supplied is not obvious to me and I don't even
see a way to retrieve those ID:s since I've only got the names of the
resources at this moment.
***
EUID Optional Long. The unique ID of the enterprise resource; required if
there is more than one resource.

RUID Optional Long. The unique ID that will be assigned to the resource
in the active project. If omitted, the next valid resource UID is assigned.

***

Thanks.
 
E

Ed Morrison

Gizmo,
You are on the right track. Use "Application.EnterpriseResourceGet , RUID"
where RUID is the UniqueID (not the ID) of the local resource you want
replaced. This method replaces the local resource in the active project
with the enterprise resource based on an exact name match.
 

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