func (pt *PowerPoint) close() {

	if pt.ppt != nil {
		oleutil.MustPutProperty(pt.ppt.ToIDispatch(), "Saved", -1)
		oleutil.MustCallMethod(pt.ppt.ToIDispatch(), "Close")
	}

	if pt.app != nil {
		oleutil.MustCallMethod(pt.app, "Quit")
		pt.app.Release()
	}

	ole.CoUninitialize()
}
Example #2
0
func (wd *Word) close() {

	if wd.doc != nil {
		oleutil.MustPutProperty(wd.doc.ToIDispatch(), "Saved", true)
	}

	if wd.documents != nil {
		oleutil.MustCallMethod(wd.documents.ToIDispatch(), "Close")
	}

	if wd.app != nil {
		oleutil.MustCallMethod(wd.app, "Quit")
		wd.app.Release()
	}

	ole.CoUninitialize()
}