Debugging a Word or Excel Add In

(relevant to Excel or Word)
In my Word application I have my VBA code in an Add In. The code manipulates text on ActiveDocument.

Unfortunately, (unlike in a macro-enabled document) this way, when I get an error I can't hit debug and go to the offending line of code - because it is in an Add In.
What is the normal/recommended way of setting up for debugging, so that I can go straight to the relevant line of code?

Thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup Finance ManagerCommented:
Unprotect the VBA Project.

In Excel or Word, open the VB Editor, from the Tools Menu select VBA ProjectProperties. In the Protection Tab you can uncheck Lock Project for viewing. You will need to know the password if one has been set.
hindersalivaAuthor Commented:
Hi Roy. The VBA Project is not protected.
From the Document the VBA Project is not viewable as it's a Word Add In.
hindersalivaAuthor Commented:
Also, I tried keeping the Add In open when the error occurs. Same.
If you have the code, try running it as a VBA macro under the same circumstances.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hindersalivaAuthor Commented:
Sorry, it's my Doh! moment.
I had forgotten how simple .........
Thanks for the hint Graham.
I opened the Add In. Made the document the Active Document. Ran the code from the IDE.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.