Not sure how many people share my style, but when I'm working on a new sample project, I initially develop the code in a large project that already has extensive code either initially or from old work, and then copy the relevant parts into a new demo project or post. Well, I got tired of manually isolating declares, so spent a couple hours writing a tool to automate it a bit.
Future versions will automate things more and maybe add support for functions/subs.
How it works:
-Load the codebase, either a project's folder or manually selecting files.
-Enter a term in the textbox and click Add <type>
-The codebase is searched for the declare, searching either public or private first depending on preference
APIs that are broken with _ are supported.
Support for things declared in typelibs not yet supported.
This is a rough beta, so it's missing some polish like robust error handling and additional formatting options, but I do plan to work on it more in the future.
Requirements
-oleexp3.tlb (found here) is used for the file open/folder select dialogs. Can be substituted to avoid either the typelib or its Vista+ requirement; files are just fed into a processing function so you can use an alternate file selection method.