Thanks for the responses guys. I've been offline for a couple of weeks and only seeing these now.
As it happens, I'm good as far as exporting the actual code to Word is concerned. And while I know I have a lot of work ahead in terms of formatting the output, I'm prepared for it. Also, I know the objective will require access to the VBA project model and I'll make this clear to anyone who runs the resulting add-in.
The only solutions to what I'm doing that I can find online at the moment involve installing some other program to do the work but a lot of companies restrict employees from installing programs. A VBA add-in is a niche I hope to fill.
Back to my OP though... Thanks, norie I could do that, in fact that is one of the options the add-in provides. But in the interests of giving options to the user, one I was hoping to add is to allow the user to just use the colours they have already set up in the VBE without having to reselect them all in my add-in and for that I need to query the existing settings. I'd also need to do this for the font they use, the point size and so on.
I will at some point need to start a thread about identifying a list of all the keywords or reserved words used in VBA but I will save that for a separate thread. I'm kind of getting the impression that there is no direct way to do what I need here. But, like I said, there are third party programs that can do it. What about using some kind of API to query the contents of a window like I need to do if I want my code to enter the password to open a locked VBA project for instance. Could that be a way to get what I need?
Bookmarks