Add-in Error Message - Microsoft Community


i'm writing add-in custom ribbon tab uses lots of getenabled calls check status of objects. used references activepresentation , activewindow. have no problems when running code pptm because creates presentation window, error messages ppam. if there no presentation active when switch custom tab, multiple instances of:

run-time error '-2147188160 (80048240)':

application (unknown member) : invalid request. there no active document window.

how fix or circumvent this?

off top of head, i'd try having getenabled handler include error handler returns false.

public function inotherwords(parm,parm) boolean

  on error goto whoopsie

  ' cool stuff here

  ' set function return, ...

  allswellthatendshere:

  exit function

  whoopsie:

  inotherwords = false

  resume allswellthatendshere

end function

you might able

if presentations.count < 1 then

  ' set function return false

  exit function

end if

' got here, got presentations, go,

' go



Office / PowerPoint / Windows other / Office 2010



Comments

Popular posts from this blog

message deleted by transport agent, event: LED=550 4.3.2 - Microsoft Community

Microsoft Office Exchange Error message - Microsoft Community

Outlook Rules not Running Automatically - Microsoft Community