Yes, it certainly is. The Office object model is exposed as a COM
interface. As a start, look for examples that deal with IDTExtensibility2.
If you are working in C++ I recommend using the ATL library, which helps
with COM interfaces.
You can use any language capable of creating a COM DLL. In addition to
C++, you could use VB6, Delphi, or even Python. VB6 is fading, and
Delphi costs a non-trivial amount of money if this is your only use
for it. Neither VB6 or Delphi can support 64-bit add-ins required for
the upcoming 64-bit version of Excel 2010. (I don't know if there will
be 64-bit versions of the other Office applications.) With something
like Python, you're going to find less community support available,
but I believe SpamBayes is open source if you want to see an example.