Exporting Data to Excel in a Map listed in the .mpp file

G

George1986

I'm trying to use a VBA FileSaveAs command from Excel2000 to Project Server
2003 to export an Excel file in a format described in an export map that is
in the .mpp file, not the Global file. I'm trying this code.

MS_Project.Application.FileSaveAs Name:=MSProj_DataFile, ReadOnly:=True, _
FormatID:="MSProject.XLS5", map:="Org Training Spreadsheet

It works fine if the map is in the global, but Project does not recognize
the map if its only in the .mpp file. Project says that the map doesn't
exist even though I can see it using MapList. New users to the Excel tool
will not have this map in their global. Is there a way to specify that the
map is in the .mpp file?

I could move the map from the .mpp to the global using OrganizerMoveItem
but I could not find a way to see if the map is in the user's global.mpt
using the MapList method. It was always masked by the map already being in
the .mpp.

Any ideas? Thanks.
 
R

Rod Gill

Try doing the task manually and recording a macro of you doing it. See what
code gets recorded and try that. If you can't do the action manually then
it's not a coding issue, but more likely a file corruption of the map. Try
re-creating it or creating a new file. See www.mvps.org/project and the FAQ
for a way of removing corruptions.

--

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more

NEW!! Project VBA Book now in stock, for details visit:
www.projectvbabook.com
 

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