|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I send 'Save' message to the excel main window?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. It isn't an answer to your question, but please have a look at VSTO:
http://msdn2.microsoft.com/en-us/library/d2tx7z6d(VS.80).aspx As Excel is an Office product, you might want to use it... iloveprincess schreef: Show quoteHide quote > 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. Thank you for your reply.
I really appreciate. Show quoteHide quote "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/library/d2tx7z6d(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. > >
what is a static property and a cursor question
Updating Datagridview Delete Directory not working Create Serial Number Data entry into ComboBox VB.NET debug error VS 2005 baffled at step 1 How to run and communicate a DOS program file in a VB.NET program? Need help with CreateFile API function Installed version of Access |
|||||||||||||||||||||||