My application opens, updates, saves & closes an MS Project file. The
module/form that this code is in has no reference to a Word application
(although other modules that are not called from this one do).
I'm finding a new instance of Word in the Task Manager everytime I run this
code.
Any ideas on preventing it from opening?
The code to Open/Close project follows.
Dim pjApp As New MSProject.ApplicationClass
Dim sTemp As String = sPrjPath & "Template.MPP"
pjApp = CreateObject("MSProject.Application")
pjApp.Visible = False
pjApp.FileOpen(sTemp, False, , , , , True, , , , ,
MSProject.PjPoolOpen.pjPoolReadOnly)
pjApp.ProjectSummaryInfo(, sProjNm, sProgram, sLead, "Company Info", , , ,
dtRqstDt)
pjApp.SelectTaskField(0, "Name")
pjApp.SetTaskField("Name", sProjNm)
pjApp.FileSaveAs(sMPP)
pjApp.FileCloseAll(MSProject.PjSaveType.pjDoNotSav e)
pjApp.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComO bject(pjApp)
pjApp = Nothing
One other question, I use similar code in another module and Project is not
visible, yet in this module it is visible. Any ideas on that one?
Thanks,
Taras