I adapted code from http://msdn2.microsoft.com/en-us/lib...7c(VS.80).aspx to use in Microsoft Word.

When i try to run the code, the first CType gets highlighted and i get an error message: "Compile Error: Sub or Function not defined"

I think i am missing a Reference, but i don't know which. What's up?