how to control other windows applications??

Posted on 2000-03-13
Last Modified: 2013-11-20
basically i need to write a VC program which can control other windows applications.

for example, i would like this program to launch winword, and let it open a *.doc file, and then invoke its "save as" menu item to save the file as text format.

how would i automate this process in a VC program?
Question by:BBB
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 2614468
open ClassWizard
click on  "newClass" button
select from type lib
file open dialog will be shown
select type librAry you need
(Excel8.olb forExcel 97, msacc8.olb for Access 97 etc.)
and add neccessary classes to your project
ClassWizwd will create wrapper class to automate objects you need

The exact sequence of calls needed for doing what you need can be found in Office VBA help.

Expert Comment

ID: 2614481

Expert Comment

ID: 2628170

Well there a good example for you question in :

Hope it will work :)

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 2628185
barbix changed the proposed answer to a comment

Accepted Solution

barbix earned 74 total points
ID: 2628189

Well there a good example for you question in : 

Hope it will work :)


Author Comment

ID: 2628884
Hi there,
I appreciate all the clues...

But my question is more generic: I want to control other windows applications automatically in my program. I took winword as an example. So assume other windows application do not support OLE, etc kind of thing, how would I control these applications?

There are something called hook in windows. But I am not sure how to use them.


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question