(defun c:tt (/ a b)
;(setq a (vlax-get-or-create-object "excel.application"))
;(setq a (vlax-get-or-create-object "word.application"))
(setq a (vlax-get-or-create-object "PowerPoint.application"))
;(setq b (vlax-invoke-method (vlax-get-property a 'workbooks) 'add))
;(setq b (vlax-invoke-method (vlax-get-property a 'Documents) 'add))
(setq b (vlax-invoke-method (vlax-get-property a 'Presentations) 'add))
(vlax-dump-object b t)
(vlax-invoke-method b 'close)
(vlax-invoke-method a 'quit)
(vlax-release-object b)
(vlax-release-object a)
(princ)
)
当excel时,VBProject正常;当word时或PowerPoint时,VBProject发生意外