By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,275 Members | 2,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,275 IT Pros & Developers. It's quick & easy.

How can I send 'Save' message to the excel main window?

P: n/a
Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.

Nov 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
It isn't an answer to your question, but please have a look at VSTO:
http://msdn2.microsoft.com/en-us/lib...6d(VS.80).aspx
As Excel is an Office product, you might want to use it...

iloveprincess schreef:
Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.
Nov 27 '06 #2

P: n/a
Thank you for your reply.

I really appreciate.

"Michel van den Berg" wrote:
It isn't an answer to your question, but please have a look at VSTO:
http://msdn2.microsoft.com/en-us/lib...6d(VS.80).aspx
As Excel is an Office product, you might want to use it...

iloveprincess schreef:
Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.

Nov 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.