public void Close() { doc.Close(); ((Microsoft.Office.Interop.Publisher._Application)app).Quit(); Marshal.FinalReleaseComObject(doc); Marshal.FinalReleaseComObject(app); doc = null; app = null; }
public bool Open() { app = new Microsoft.Office.Interop.Publisher.Application(); doc = app.Open(filePath, true); if (doc == null) { return(false); } return(true); }