Error on using Toolbar (no active document window)

J

Jackie

Can anyone help (please)?

I have created a toolbar in PowerPoint that allows users to create Brand
compliant PowerPoint presentations. The code has been saved as a ppa file but
I have noticed that if a document is not open when the user selects some of
the items on the toolbar I receive an error "Application (unknown member) :
Invalid request. There is no currently active document window." (These items
run a userform)

To trap the error, I am counting the presentations and creating a new
presentation if there are none open (which works in Word but for some reason
does not work in PowerPoint) - I receive the above error.

Any suggestions would be greatly appreciated.
Jackie
 
J

Jackie

Hi Steve

Apologies for not being clear. The toolbar has a number of buttons, a couple
of the buttons initialises a userform. When you click any button that opens a
userform, with no document open, you receive the error.

I have tried to error trap by placing code (which identifies if a
presentation is open) on the pressing of the button but this does not appear
to work.

Regards
Jackie
 
J

Jackie

Steve

My problem was getting access to the AddIn to enable me to trap the error. I
had no idea that you could get access to an AddIn. I had been trying to trap
the error on the pot file but could not trap the error as the pot file has an
open presentation (itself) and the error related to no presentation being
open.

Many thanks for the "How to get VBA code from AddIn", I am now able to see
where it is tripping and resolve.

Regards
Jackie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top