Hi,

I would like to know the following code will work in linux using Mono & .Net


 Sub Test()
 Dim FSO

 Dim MSProjectApp
 Dim INPath,OUTPath

 Const pjDoNotSave = 0

 INPath = Document.ConvertMPP.filename.value
 OUTPath = Replace(INPath,".mpp",".mpd")

 'validate the IN and OUT parameters
 If INPath = "" OR OUTPath = "" Then
  ' error condition - does not require any action
 Else
  'Validate the Input file
  Set FSO = CreateObject("Scripting.FileSystemObject")

  If FSO.FileExists(INPath) Then
   'convert the mpp to mpd
   Set MSProjectApp = CreateObject("MSProject.Application")

   MSProjectApp.FileOpen(INPath)
   MSProjectApp.FileSaveAs(OUTPath)
   MSProjectApp.Application.FileCloseAll(pjDoNotSave)

   Set MSProjectApp = Nothing
  End If

  If FSO.FileExists(OUTPath) Then
   'FSO.DeleteFile(OUTPath)  ' commented,
  End If

  Set FSO = Nothing
 End If

End Sub

Thanks
Suneesh
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to