opening a file

N

nikhil

Hello every one,

Can any one tell me the syntax for opening and closing a file in
associated program from C++.
For an instance I got a MS word file. How can I open it in MS word
from a console program in C++. and also how can I close any
application from the console program ( like closing MS word opened in
previous step).

I'm using Visual Studio 2005.

thanks
 
S

santosh

nikhil said:
Hello every one,

Can any one tell me the syntax for opening and closing a file in
associated program from C++.

[ ... ]

What makes you think a C++ question is topical in a C group?

Post to news:comp.lang.c++
 
K

Kenneth Brody

santosh said:
Hello every one,

Can any one tell me the syntax for opening and closing a file in
associated program from C++.

[ ... ]

What makes you think a C++ question is topical in a C group?

Post to news:comp.lang.c++

Given that he doesn't want to open the file in his program, but rather
how to get the "associated program" (ie: MS-Word in his case) to open
and close it, I doubt that clc++ is the right place, either. This is
clear by the unquoted part of the OP:
For an instance I got a MS word file. How can I open it in MS word
from a console program in C++. and also how can I close any
application from the console program ( like closing MS word opened in
previous step).

The right place would be one of the Windows-specific groups, but I
don't know which one.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 
D

Default User

santosh said:
nikhil said:
Hello every one,

Can any one tell me the syntax for opening and closing a file in
associated program from C++.

[ ... ]

What makes you think a C++ question is topical in a C group?

Post to news:comp.lang.c++


Geez. Don't send him to clc++ with all that non-standard crap.




Brian
 
U

user923005

Hello every one,

Can any one tell me the syntax for opening and closing a file in
associated program from C++.
For an instance I got a MS word file. How can I open it in MS word
from a console program in C++. and also how can I close any
application from the console program ( like closing MS word opened in
previous step).

I'm using Visual Studio 2005.

Your answer is somewhere in the area.
Your question is about OLE Automation.
Happy hunting.
 
N

nikhil

Your answer is somewhere in the area.
Your question is about OLE Automation.
Happy hunting.

thanks guys for helping me out,
by the way I posted this question here,as my question was for both C/C+
+, I'm sorry I forgot to mention c above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top