Without the errors is help hard. I recommand that you carefully stufy this article about
Office Automation Using Visual C++. It contains the needed knowledge.
And I googled this
C++ app automates Word from Microsoft.
My experience is that the versions of Visual Studio and Office should have minimal differences in its release dates.
Tip: take a look at C#, because it is easier and nicer, and is a higher abstraction language. Well suited for that stuff.