The code seems based around driving MSProject.Application.  So unless
you have some magic copy of Microsoft Project that runs on Linux, then
no it won't run on Linux. :-,)

(The use of the FSO could be converted to System.IO .File etc calls but
that's minor compared to the first).

Andy


________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suneesh V.R
        Sent: 02 August 2007 07:55
        To: [email protected]
        Subject: [Mono-list] MPP to MPD
        
        
        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