Solved

how to control other windows applications??

Posted on 2000-03-13
6
151 Views
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?
0
Comment
Question by:BBB
[X]
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
6 Comments
 
LVL 5

Expert Comment

by:vachooho
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.
0
 
LVL 5

Expert Comment

by:vachooho
ID: 2614481
0
 

Expert Comment

by:barbix
ID: 2628170
Hi.

Well there a good example for you question in :

http://support.microsoft.com/support/kb/articles/Q238/6/11.asp

Hope it will work :)

     Eran
0
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

by:barbix
ID: 2628185
barbix changed the proposed answer to a comment
0
 

Accepted Solution

by:
barbix earned 74 total points
ID: 2628189
Hi.

Well there a good example for you question in :

http://support.microsoft.com/support/kb/articles/Q238/6/11.asp 

Hope it will work :)

     Eran
0
 

Author Comment

by:BBB
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.

Thanks
0

Featured Post

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!

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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…

734 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