Tim Golden wrote:
Ron Henderson wrote:
Thanks so much for trying this out. You've verified that it's
possible to get this working.
However, when I execute the same code, the file p2.csv is exactly
same size as p1.mpp and contains binary data, not the text. Since you
have it working
Thanks so much for trying this out. You've verified that it's possible
to get this working.
However, when I execute the same code, the file p2.csv is exactly same
size as p1.mpp and contains binary data, not the text. Since you have
it working it must be a bug in either my version of
= win32com.client.Dispatch (MSProject.Application)
project.FileOpen (c:/temp/p1.mpp)
project.FileSaveAs (Name=c:/temp/p2.csv, FormatID=MSProject.CSV,
Map=p1)
project.FileClose (Save=0)
project.FileQuit ()
/code
--
Ron Henderson
DreamWorks Feature Animation, RD
818 695-3199
My guess is that it *is* a Python problem somewhere in the win32com
bindings, based on the fact that executing a macro seems to do the right
thing but going directly through the com API from Python does not.
The macro executes essentially the same functionality:
Sub my_export()
FileSaveAs
Does anybody know how to avoid the Export Wizard when saving a file
with MSProject? The FileSaveAs method seems to ignore the Map keyword.
My code looks essentially like this:
mp = Dispatch(MSProject.Application)
mp.FileOpen(mppFile)
mp.FileSaveAs(csvFile, Format=3, Map=My Export Map)