You are here:

C++/word erplacement ...


Dear sir,
Hello !

I want to develope a program so that it is able of replacing some special words in a DOC file, with another word.

It seems that microsoft has provided programmers with some SDK or Office-API that does the task. What I exactly want to know is that using which library and which function helps me do the task.  I do not want to parse the DOC file, but I want to get "microsoft provided functions" to do the replacement for me.

Thank you very much."

Mohammad , Thank you for your question.

You will have to obtain the COM Automation Interfaces for Microsoft Word. This software will include instructions for its use, although you will have to learn how to do COM programming to use C++ to do this (Visual Basic contains easy support for COM programming).

I do not know the details of where to obtain the Word API, or even if it is available outside of Microsoft. You can search Microsoft's MSDN Library at

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2017 All rights reserved.