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
Solved

how to control other windows applications??

Posted on 2000-03-13
6
149 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 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