Saving offline (MOPS2007) to MSP2003 format.

Q

Quizzed again

I cannot seem to figure this out. Any help would be greatly appreciated.
I use the following code to save a MSP2007 file to a user's local drive in
MSP2007 fromat. THen it transfers some enterprise resource custom field data
to local custom fields. Then it tries to save the file as a MSP2003 file. But
it hangs on the save as 2003 file and I cannot figure out why. In other cases
where this code was slightly modified, no matter what I tried, this last line
of code (save as .. .mpp.9) did NOT result in a 2003 format file. I even had
a line of code that changed the default save method to 2003 format and also
used the formatid:=xxx.mpp.9 and that did not work at all. It saved but 2003
users got the message that they could not open the file because it was
created by a newer version. Some glaring error here?

FileSaveAs Name:="C:\DeliverToMPM\" & ActiveProject.Name,
formatid:="MSProject.MPP"
OptionsCalculation Automatic:=False

ViewApply Name:="MPMFinancePrep1"
FilterApply Name:="All Resources"


SelectResourceColumn Column:="Employee Number", Additional:=3
EditCopy
SelectResourceColumn Column:="Text1", Additional:=3
EditPaste
EditPaste


FileSaveAs Name:="C:\DeliverToMPM\" & ActiveProject.Name,
formatid:="MSProject.MPP.9"
 
R

Rod Gill

Hi,

Try a break on the Save as command then look at teh ActiveProject.Name
property. Does the name end in .mpp? If not it won't save.

If you record a macro of you doing all this manually, do you get anything
different recorded?

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Quizzed again said:
I cannot seem to figure this out. Any help would be greatly appreciated.
I use the following code to save a MSP2007 file to a user's local drive in
MSP2007 fromat. THen it transfers some enterprise resource custom field
data
to local custom fields. Then it tries to save the file as a MSP2003 file.
But
it hangs on the save as 2003 file and I cannot figure out why. In other
cases
where this code was slightly modified, no matter what I tried, this last
line
of code (save as .. .mpp.9) did NOT result in a 2003 format file. I even
had
a line of code that changed the default save method to 2003 format and
also
used the formatid:=xxx.mpp.9 and that did not work at all. It saved but
2003
users got the message that they could not open the file because it was
created by a newer version. Some glaring error here?

FileSaveAs Name:="C:\DeliverToMPM\" & ActiveProject.Name,
formatid:="MSProject.MPP"
OptionsCalculation Automatic:=False

ViewApply Name:="MPMFinancePrep1"
FilterApply Name:="All Resources"


SelectResourceColumn Column:="Employee Number", Additional:=3
EditCopy
SelectResourceColumn Column:="Text1", Additional:=3
EditPaste
EditPaste


FileSaveAs Name:="C:\DeliverToMPM\" & ActiveProject.Name,
formatid:="MSProject.MPP.9"
FormatID:="MSProject.MPP.9"
 
Q

Quizzed again

The macro recorder produces the same text. Yes the ActiveProject name is the
correct name and has the .mpp extension.
This should work as we expect right? Perhaps my client SW is corrupt? I'll
try repair and repost. I did a fresh install of the SW yesterday though.
Thank you for your time.
 

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